커뮤니티

지표식구합니다(84806 번 관련)

프로필 이미지
느림보
2023-12-04 10:19:51
1020
글번호 174545
답변완료
분봉 또는 틱봉의 전일과 분리된 종가파라볼릭에서 상승파라볼릭 하락파라볼릭 살승파라볼릭을 반복하는 구간의 봉의갯수를 계속해서 구하는 지표식 구합니다 위와 같이 봉의갯수를 구했을때 그값이 n개 이상인것은 표시하지 않도록 하게해주세요 감사합니다
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2023-12-04 16:25:57

안녕하세요 예스스탁입니다. 이미 과거봉에 표시된 값들은 지울수가 없습니다. 그러므로 진행중 봉이 n개이상이면 해당 구간과거 표시된 값은 지울수가 없습니다. 이전에 출력된 것은 지울수가 없고 n개가 넘어가면 이후봉에 출력하지 않게 작성해 드립니다. Input : AF(0.02), AFMAX(0.2),sto1(10),sto2(0),n(10); Var : Direction(0), SAR_Value(Close), AF_Value(.02), HighValue(High), LowValue(Low), EP(0),CSarv(0); var : b(0); 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 CrossUp(C,CSarv) or CrossDown(c,CSarv) Then { b = 0; } b = b+1; if b < n Then Plot1(b); Else NoPlot(1); 즐거운 하루되세요 > 느림보 님이 쓴 글입니다. > 제목 : 지표식구합니다(84806 번 관련) > 분봉 또는 틱봉의 전일과 분리된 종가파라볼릭에서 상승파라볼릭 하락파라볼릭 살승파라볼릭을 반복하는 구간의 봉의갯수를 계속해서 구하는 지표식 구합니다 위와 같이 봉의갯수를 구했을때 그값이 n개 이상인것은 표시하지 않도록 하게해주세요 감사합니다