커뮤니티

파라볼릭 지표에 대하여 문의드립니다.

프로필 이미지
coolstuf
2011-11-30 08:50:48
721
글번호 45300
답변완료

첨부 이미지

안녕하세요? 수고 많으십니다. 제가 파라볼릭 지표를 활용하려 하는데요, 현재 사용자함수에 있는 파라볼릭 계산식(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); } }
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2011-11-30 09:50:37

안녕하세요 예스스탁입니다. 문의하신 내용은 함수자체를 손을 보실 필요는 없습니다. 수식에서 파라볼릭을 사용하실 때 파라볼릭의 한봉전 값을 현재봉에 그리도록 작성하시면 됩니다. Input : af(0.02), maxAF(0.2); Plot1(SAR(af,maxAF)[1], "SAR"); 즐거운 하루되세요 > coolstuf 님이 쓴 글입니다. > 제목 : 파라볼릭 지표에 대하여 문의드립니다. > 안녕하세요? 수고 많으십니다. 제가 파라볼릭 지표를 활용하려 하는데요, 현재 사용자함수에 있는 파라볼릭 계산식(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); } }