커뮤니티

지표식구합니다

프로필 이미지
느림보
2023-03-07 15:51:14
1162
글번호 166992
답변완료
전일과 분리된 종가파라볼릭에서 하락파라볼릭이 발생하고 macd의 값이 "0"이상에서 계속 진행되고 상승파라볼릭이 발생할 경우를 나타내는 지표식 구합니다 반대로 상승파라볼릭 발생하고 macd의 값이 "0"이하에서 계속 진행되고 하락파라볼릭이 발생할 경우를 나타내는 지표식 구합니다 감사합니다
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2023-03-07 16:23:46

안녕하세요 예스스탁입니다. 매수조건만족하면 1, 매도조건만족하면 -1로 표시되게 작성해 드립니다. Input : AF(0.02), AFMAX(0.2),short(12),long(26); Var : Direction(0), SAR_Value(Close), AF_Value(.02), HighValue(High), LowValue(Low), EP(0),CSarv(0); var : T(0),S(0),MACDV(0); MACDV = MACD(short,long); if Index == 0 or (Bdate != Bdate[1]) Then { Direction = 0; SAR_Value = C; AF_Value = 0.02; HighValue = H; LowValue = L; 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 Close < 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 Close > SAR_Value then { Direction = 1; SAR_Value = EP; AF_Value = 0; EP = 0; HighValue = High; } } 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 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; } } CSarv = 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; CSarv = SAR_Value; } } if Direction == -1 then { if Close > Close[1] then { Direction = 1; SAR_Value = LowValue; CSarv = SAR_Value; } } } LowValue = min(Low, LowValue); HighValue = max(High, HighValue); } } if Bdate != Bdate[1] Then T = 0; S = 0; if CrossUp(c,CSarv) Then { T = 1; if T[1] == -1 then S = 1; } if CrossDown(c,CSarv) Then { T = -1; if T[1] == 1 then S = -1; } if T == 1 and MACDV > 0 Then T = 2; if T == -1 and MACDV < 0 Then T = -2; plot1(S); 즐거운 하루되세요 > 느림보 님이 쓴 글입니다. > 제목 : 지표식구합니다 > 전일과 분리된 종가파라볼릭에서 하락파라볼릭이 발생하고 macd의 값이 "0"이상에서 계속 진행되고 상승파라볼릭이 발생할 경우를 나타내는 지표식 구합니다 반대로 상승파라볼릭 발생하고 macd의 값이 "0"이하에서 계속 진행되고 하락파라볼릭이 발생할 경우를 나타내는 지표식 구합니다 감사합니다