커뮤니티

문의

프로필 이미지
레전드
2018-09-08 20:50:23
173
글번호 121902
답변완료
파라볼릭을 고저점을 기준으로 하기도하고 종가를 기준으로도 만들어지는데, 혹시 5이평을 기준으로도 만들수 있나요?
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2018-09-10 11:00:02

안녕하세요 예스스탁입니다. Input : P(5),AF(0.02), AFMAX(0.2); Var : Price(0),Direction(0), SAR_Value(C); var : AF_Value(.02), HighValue(C), LowValue(C), EP(0),Sarv(0); Price = ma(C,5); if EP != 0 Then { if Direction == 1 then { EP = HighValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if Price > HighValue then { HighValue = Price; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } if Price < SAR_Value then { Direction = -1; SAR_Value = EP; AF_Value = 0; EP = 0; LowValue = Price; } } else { EP = LowValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if Price < LowValue then { LowValue = Price; AF_Value = AF_Value + Af; if AF_Value >= AFMAX then AF_Value = AFMAX; } if Price > SAR_Value then { Direction = 1; SAR_Value = EP; AF_Value = 0; EP = 0; HighValue = Price; } } 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 Price > HighValue then { HighValue = Price; 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 Price < LowValue then { LowValue = Price; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } } Sarv = SAR_Value; } else { if Direction == 0 then { if Price > Price[1] then Direction = 1; else if Price < Price[1] then Direction = -1; } else { if Direction == 1 then { if Price < Price[1] then { Direction = -1; SAR_Value = HighValue; Sarv = SAR_Value; } } if Direction == -1 then { if Price > Price[1] then { Direction = 1; SAR_Value = LowValue; Sarv = SAR_Value; } } } LowValue = min(Price, LowValue); HighValue = max(Price, HighValue); } } plot1(sarv); plot2(price); 즐거운 하루되세요 > 레전드 님이 쓴 글입니다. > 제목 : 문의 > 파라볼릭을 고저점을 기준으로 하기도하고 종가를 기준으로도 만들어지는데, 혹시 5이평을 기준으로도 만들수 있나요?