커뮤니티

파라볼릭 문의드립니다.

프로필 이미지
질럿
2016-09-29 01:45:52
154
글번호 102282
답변완료
파라볼릭지표에서 SAR값의 변수를 수정하고 싶어서 그런데 예스랭귀지에 저장된 SAR 코드를 알려주실 수 있나요? 감사합니다.
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2016-09-29 14:06:57

안녕하세요 예스스탁입니다. 예스랭귀지 편집기에서 사용자함수에 보시면 SAR함수가 있습니다. 클릭하면 해당 내용 보실수 있습니다. 내용은 아래와 같습니다. /* Description : Parabolic (S)top (A)nd (R)eversal * * Provided By : YesStock Inc. (c) Copyright 2006 * E-Mail : webmaster@yesstock.com */ 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 코드를 알려주실 수 있나요? 감사합니다.