수고하십니다
1) AFMAX(value1) 으로 가변 되는지요
가능하다면
2) 소수점 아래 5자리수 아래로는 버렸으면 합니다
감사합니다
Input : AF(0.01), AFMAX(Value1);
value1 = Data2(c) / Data3(c) ;
Input : p(0);
var : Diff(0), mav(0);
Diff = (C);
mav = ma(Diff,P);
Var : Direction(0), SAR_Value(Diff), AF_Value(.02), HighValue(diff), LowValue(diff), EP(0),CSARV(0);
if Diff == 0 Then
Diff = Diff[1];
if EP != 0 Then
{
if Direction == 1 then
{
EP = HighValue;
SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value);
if diff > HighValue then
{
HighValue = diff;
AF_Value = AF_Value + AF;
if AF_Value >= AFMAX then AF_Value = AFMAX;
}
if diff < SAR_Value then
{
Direction = -1;
SAR_Value = EP;
AF_Value = 0;
EP = 0;
LowValue = diff;
}
}
else
{
EP = LowValue;
SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value);
if diff < LowValue then
{
LowValue = diff;
AF_Value = AF_Value + Af;
if AF_Value >= AFMAX then AF_Value = AFMAX;
}
if diff > SAR_Value then
{
Direction = 1;
SAR_Value = EP;
AF_Value = 0;
EP = 0;
HighValue = diff;
}
}
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 diff > HighValue then
{
HighValue = diff;
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 diff < LowValue then
{
LowValue = diff;
AF_Value = AF_Value + AF;
if AF_Value >= AFMAX then AF_Value = AFMAX;
}
}
CSarv = SAR_Value;
}
else
{
if Direction == 0 then
{
if diff > diff[1] then Direction = 1;
else
if diff < diff[1] then Direction = -1;
}
else
{
if Direction == 1 then
{
if diff < diff[1] then
{
Direction = -1;
SAR_Value = HighValue;
CSarv = SAR_Value;
}
}
if Direction == -1 then
{
if diff > diff[1] then
{
Direction = 1;
SAR_Value = LowValue;
CSarv = SAR_Value;
}
}
}
LowValue = min(diff, LowValue);
HighValue = max(diff, HighValue);
}
}
if (diff > CSARV) Then
Buy("매수");
if (diff < CSARV) Then
ExitLong("청산");
답변 1
예스스탁
예스스탁 답변
2024-07-11 13:47:09
안녕하세요
예스스탁입니다.
문의하신 내용은 가능하지 않습니다.
도움을 드리지 못해 죄송합니다.
즐거운 하루되세요
> dkfvkrh7 님이 쓴 글입니다.
> 제목 : 문의 드립니다
> 수고하십니다
1) AFMAX(value1) 으로 가변 되는지요
가능하다면
2) 소수점 아래 5자리수 아래로는 버렸으면 합니다
감사합니다
Input : AF(0.01), AFMAX(Value1);
value1 = Data2(c) / Data3(c) ;
Input : p(0);
var : Diff(0), mav(0);
Diff = (C);
mav = ma(Diff,P);
Var : Direction(0), SAR_Value(Diff), AF_Value(.02), HighValue(diff), LowValue(diff), EP(0),CSARV(0);
if Diff == 0 Then
Diff = Diff[1];
if EP != 0 Then
{
if Direction == 1 then
{
EP = HighValue;
SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value);
if diff > HighValue then
{
HighValue = diff;
AF_Value = AF_Value + AF;
if AF_Value >= AFMAX then AF_Value = AFMAX;
}
if diff < SAR_Value then
{
Direction = -1;
SAR_Value = EP;
AF_Value = 0;
EP = 0;
LowValue = diff;
}
}
else
{
EP = LowValue;
SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value);
if diff < LowValue then
{
LowValue = diff;
AF_Value = AF_Value + Af;
if AF_Value >= AFMAX then AF_Value = AFMAX;
}
if diff > SAR_Value then
{
Direction = 1;
SAR_Value = EP;
AF_Value = 0;
EP = 0;
HighValue = diff;
}
}
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 diff > HighValue then
{
HighValue = diff;
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 diff < LowValue then
{
LowValue = diff;
AF_Value = AF_Value + AF;
if AF_Value >= AFMAX then AF_Value = AFMAX;
}
}
CSarv = SAR_Value;
}
else
{
if Direction == 0 then
{
if diff > diff[1] then Direction = 1;
else
if diff < diff[1] then Direction = -1;
}
else
{
if Direction == 1 then
{
if diff < diff[1] then
{
Direction = -1;
SAR_Value = HighValue;
CSarv = SAR_Value;
}
}
if Direction == -1 then
{
if diff > diff[1] then
{
Direction = 1;
SAR_Value = LowValue;
CSarv = SAR_Value;
}
}
}
LowValue = min(diff, LowValue);
HighValue = max(diff, HighValue);
}
}
if (diff > CSARV) Then
Buy("매수");
if (diff < CSARV) Then
ExitLong("청산");