안녕하세요.
당일분 종가 파라볼릭 기준으로 부탁드립니다.
* 파라볼릭 양전환시
양전환 직전1-5봉(파라볼릭 음상태) 최고가/최저가
* 파라볼릭 음전환시
음전환 직전1-5봉(파라볼릭 양상태) 최고가/최저가
감사합니다.
답변 1
예스스탁
예스스탁 답변
2022-04-11 15:59:44
안녕하세요
예스스탁입니다.
Input : af(0.02), AFMAX(0.2);
Var : Direction(0), SAR_Value(Close), AF_Value(.02), HighValue(High), LowValue(Low), EP(0);
var : csarv(0),t(0),hh(0),ll(0);
if Index == 0 or (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);
}
}
Plot1(csarv,"종가파라볼릭",iff(C>csarv,Red,Blue));
if CrossUp(C,csarv) Then
{
hh = Highest(H,5)[1];
ll = Lowest(L,5)[1];
}
if CrossDown(C,csarv) Then
{
hh = Highest(H,5)[1];
ll = Lowest(L,5)[1];
}
Plot2(hh);
plot3(ll);
즐거운 하루되세요
> 한국사람73 님이 쓴 글입니다.
> 제목 : 수식
> 안녕하세요.
당일분 종가 파라볼릭 기준으로 부탁드립니다.
* 파라볼릭 양전환시
양전환 직전1-5봉(파라볼릭 음상태) 최고가/최저가
* 파라볼릭 음전환시
음전환 직전1-5봉(파라볼릭 양상태) 최고가/최저가
감사합니다.