커뮤니티

파라볼릭 지표함수의 알고리즘

프로필 이미지
시트
2021-01-26 13:53:46
1084
글번호 145805
답변완료
안녕하세요. 현재 예스랭귀지에서 시스템트레이딩을 개발하고 있는중입니다. 파라볼릭의 지표를 약간 수정해서 사용하고 싶은데 예스랭귀지에서는 파라볼릭 지표함수가 Sar(가속도, 가속도최대치) 만 제공되는거 같은데 이 Sar 값 자체를 구하는 알고리즘을 알고싶습니다. 감사합니다.
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2021-01-26 16:34:58

안녕하세요 예스스탁입니다. 예스랭귀지 편집기에서 사용자함수 중 sar를 열어보시면 됩니다. 함수식 내용은 아래와 같습니다. Input : AF(NumericSimple), AFMAX(NumericSimple); Var : Direction(0), SAR_Value(Close), AF_Value(.02), HighValue(High), LowValue(Low), 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; } } Sar = 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; } } Sar = 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; Sar = SAR_Value; } } if Direction == -1 then { if Close > Close[1] then { Direction = 1; SAR_Value = LowValue; Sar = SAR_Value; } } } LowValue = min(Low, LowValue); HighValue = max(High, HighValue); } } 즐거운 하루되세요 > 시트 님이 쓴 글입니다. > 제목 : 파라볼릭 지표함수의 알고리즘 > 안녕하세요. 현재 예스랭귀지에서 시스템트레이딩을 개발하고 있는중입니다. 파라볼릭의 지표를 약간 수정해서 사용하고 싶은데 예스랭귀지에서는 파라볼릭 지표함수가 Sar(가속도, 가속도최대치) 만 제공되는거 같은데 이 Sar 값 자체를 구하는 알고리즘을 알고싶습니다. 감사합니다.