예스스탁
예스스탁 답변
2022-07-04 14:24:52
안녕하세요
예스스탁입니다.
Input : AF(0.02), AFMAX(0.2);
var : CSarv(0);
csarv = CSar(af,afmax);
var : hh(0),LL(0),t(0);
if CrossUp(C,CSarv) Then
{
t = 1;
hh = h;
var1 = LL+0.65;
var2 = LL+1.0;
Var3 = LL+1.5;
Var4 = LL+2;
Var5 = LL+2.5;
Var6 = LL+3;
Var7 = LL+3.5;
Var8 = LL+4;
Var9 = LL+4.5;
}
if CrossDown(C,CSarv) Then
{
t = -1;
LL = l;
var1 = hh-0.65;
var2 = hh-1.0;
Var3 = hh-1.5;
Var4 = hh-2.0;
Var5 = hh-2.5;
Var6 = hh-3.0;
Var7 = hh-3.5;
Var8 = hh-4.0;
Var9 = hh-4.5;
}
if t == 1 Then
{
if hh > 0 and h > hh Then
hh = h;
}
if t == -1 Then
{
if LL > 0 and l < LL Then
LL = l;
}
if var1 > 0 Then
{
plot1(var1,"HL1");
plot2(var2,"HL2");
plot3(var3,"HL3");
plot4(var4,"HL4");
Plot5(Var5,"HL5");
Plot6(Var6,"HL6");
Plot7(Var7,"HL7");
Plot8(Var8,"HL8");
Plot9(Var9,"HL9");
}
즐거운 하루되세요
> 고성 님이 쓴 글입니다.
> 제목 : 종가파라볼릭 변동폭을 기본파라볼릭으로 변경
> Input : AF(0.02), AFMAX(0.2);
Var:Direction(0),SAR_Value(Close),AF_Value(.02),HighValue(High),LowValue(Low),EP(0),CSarv(0);
if Bdate != Bdate[1] Then
{
Direction = 0;
SAR_Value = C;
AF_Value = 0.02;
HighValue = H;
LowValue = L;
EP = 0;
}
if EP != 0 Then
{
if Direction == 1 then
{
EP = HighValue;
SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value);
if High > HighValue then
{
HighValue = High;
AF_Value = AF_Value + AF;
if AF_Value >= AFMAX then AF_Value = AFMAX;
}
if Close < SAR_Value then
{
Direction = -1;
SAR_Value = EP;
AF_Value = 0;
EP = 0;
LowValue = low;
}
}
else
{
EP = LowValue;
SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value);
if Low < LowValue then
{
LowValue = Low;
AF_Value = AF_Value + Af;
if AF_Value >= AFMAX then AF_Value = AFMAX;
}
if Close > SAR_Value then
{
Direction = 1;
SAR_Value = EP;
AF_Value = 0;
EP = 0;
HighValue = High;
}
}
CSarv = SAR_Value;
}
else
{
if SAR_Value != 0 && EP == 0 then
{
if Direction == 1 then
{
EP = HighValue;
AF_Value = AF;
SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value);
if High > HighValue then
{
HighValue = High;
AF_Value = AF_Value + AF;
if AF_Value >= AFMAX then AF_Value = AFMAX;
}
}
else
{
EP = LowValue;
AF_Value = Af;
SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value);
if Low < LowValue then
{
LowValue = Low;
AF_Value = AF_Value + AF;
if AF_Value >= AFMAX then AF_Value = AFMAX;
}
}
CSarv = SAR_Value;
}
else
{
if Direction == 0 then
{
if Close > Close[1] then Direction = 1;
else
if Close < Close[1] then Direction = -1;
}
else
{
if Direction == 1 then
{
if Close < Close[1] then
{
Direction = -1;
SAR_Value = HighValue;
CSarv = SAR_Value;
}
}
if Direction == -1 then
{
if Close > Close[1] then
{
Direction = 1;
SAR_Value = LowValue;
CSarv = SAR_Value;
}
}
}
LowValue = min(Low, LowValue);
HighValue = max(High, HighValue);
}
}
var : hh(0),LL(0),t(0);
if CrossUp(C,CSarv) Then
{
t = 1;
hh = h;
var1 = LL+0.65;
var2 = LL+1.0;
Var3 = LL+1.5;
Var4 = LL+2;
Var5 = LL+2.5;
Var6 = LL+3;
Var7 = LL+3.5;
Var8 = LL+4;
Var9 = LL+4.5;
}
if CrossDown(C,CSarv) Then
{
t = -1;
LL = l;
var1 = hh-0.65;
var2 = hh-1.0;
Var3 = hh-1.5;
Var4 = hh-2.0;
Var5 = hh-2.5;
Var6 = hh-3.0;
Var7 = hh-3.5;
Var8 = hh-4.0;
Var9 = hh-4.5;
}
if t == 1 Then
{
if hh > 0 and h > hh Then
hh = h;
}
if t == -1 Then
{
if LL > 0 and l < LL Then
LL = l;
}
if var1 > 0 Then
{
plot1(var1,"HL1");
plot2(var2,"HL2");
plot3(var3,"HL3");
plot4(var4,"HL4");
Plot5(Var5,"HL5");
Plot6(Var6,"HL6");
Plot7(Var7,"HL7");
Plot8(Var8,"HL8");
Plot9(Var9,"HL9");
}
당일 종가파라볼릭을 기준으로한 변동폭인데, 당일 일반파라볼릭 기준으로 바꾸고 싶습니다.