예스스탁
예스스탁 답변
2022-09-30 13:35:35
안녕하세요
예스스탁입니다.
1
Input : af(0.02), maxAF(0.2);
Var : Sarv(0),T(0);
Sarv = sar(af,maxAF);
If crossup(c,Sarv) Then
T = 1;
If CrossDown(c,Sarv) Then
T = -1;
if T == 1 and C > O and C[1] <= O[1] Then
{
T = 2;
Buy();
}
if T == -1 and C < O and C[1] >= O[1] Then
{
T = -2;
Sell();
}
2
Input : AF(0.02), AFMAX(0.2);
Var : Direction(0), SAR_Value(Close), AF_Value(.02), HighValue(High), LowValue(Low), EP(0),Sarv(0);
var : T(0),hh(0),hh1(0),hh2(0),ll(0),ll1(0),ll2(0);
var : upv(0),dnv(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 Low < 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 High > SAR_Value then
{
Direction = 1;
SAR_Value = EP;
AF_Value = 0;
EP = 0;
HighValue = High;
}
}
Sarv = 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;
}
}
Sarv = 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;
Sarv = SAR_Value;
}
}
if Direction == -1 then
{
if Close > Close[1] then
{
Direction = 1;
SAR_Value = LowValue;
Sarv = SAR_Value;
}
}
}
LowValue = min(Low, LowValue);
HighValue = max(High, HighValue);
}
}
If crossup(c,Sarv) Then
T = 1;
If CrossDown(c,Sarv) Then
T = -1;
if T == 1 and C > O and C[1] <= O[1] Then
{
T = 2;
Buy();
}
if T == -1 and C < O and C[1] >= O[1] Then
{
T = -2;
Sell();
}
즐거운 하루되세요
> uuppaa 님이 쓴 글입니다.
> 제목 : 시스템 질문입니다
> 파라볼릭이 양전환 상태에서는 양 전환시 매수, 음봉 또는 doji 다음 양봉 출현시 매수
파라볼릭이 음전환 상태에서는 음 전환시 매도, 양봉 또는 doji 다음 음봉 출현시 매도
파라볼릭이 전일과 연속 되는 경우 전일과 분리되는 경우 두 가지 경우 각각 부탁드립니다
감사합니다