커뮤니티

갭보정 지표

프로필 이미지
산과바다
2017-02-02 10:08:37
129
글번호 106458
답변완료
수고가 많으십니다 BinaryWave Seven 지표의 갭보정수식을 부탁드립니다. 답변 미리 감사드립니다
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2017-02-02 18:37:32

안녕하세요 예스스탁입니다. Input: shortPeriod(12), longPeriod(26), Period(9), maPeriod(20), ROCPeriod(12), stoPeriod1(5), stoPeriod2(3), CCIPeriod(9); Input : AF(0.02), AFMAX(0.2); Var : Direction(0), SAR_Value(Close), AF_Value(.02), HighValue(h), LowValue(l), EP(0),sarv(0); var: value(0),BW_SEVEN(0),CCIv(0); Var : Sum(0), Counter(0), MD(0), Avgvalue(0); var : gap(0),sumgap(0),GO(0),GH(0),GL(0),GC(0); if bdate != bdate[1] then { gap = Open-Close[1]; sumGap = sumGap+gap; } GO = O - sumGap; GH = H - sumGap; GL = L - sumGap; GC = C - sumGap; If CCIPeriod > 0 Then Begin Avgvalue = Ma(GH + GL + GC, CCIPeriod); MD = 0; For counter = 0 To CCIPeriod - 1 Begin MD = MD + Abs(GH[counter] + GL[counter] + GC[counter] - Avgvalue); End; MD = MD / CCIPeriod; If MD == 0 Then CCIv = 0; Else CCIv = (GH + GL + GC - Avgvalue) / (0.015 * MD); End Else CCIv = 0; if EP != 0 Then { if Direction == 1 then { EP = HighValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if gh > HighValue then { HighValue = gh; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } if gl < SAR_Value then { Direction = -1; SAR_Value = EP; AF_Value = 0; EP = 0; LowValue = gl; } } else { EP = LowValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if gl < LowValue then { LowValue = gl; AF_Value = AF_Value + Af; if AF_Value >= AFMAX then AF_Value = AFMAX; } if gh > SAR_Value then { Direction = 1; SAR_Value = EP; AF_Value = 0; EP = 0; HighValue = gh; } } 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 gh > HighValue then { HighValue = gh; 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 gl < LowValue then { LowValue = gl; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } } Sarv = SAR_Value; } else { if Direction == 0 then { if gc > gc[1] then Direction = 1; else if gc < gc[1] then Direction = -1; } else { if Direction == 1 then { if gc < gc[1] then { Direction = -1; SAR_Value = HighValue; Sarv = SAR_Value; } } if Direction == -1 then { if gc > gc[1] then { Direction = 1; SAR_Value = LowValue; Sarv = SAR_Value; } } } LowValue = min(gl, LowValue); HighValue = max(gh, HighValue); } } if ema(GC,shortPeriod)-ema(GC,longPeriod) >= ema(ema(GC,shortPeriod)-ema(GC,longPeriod),Period) then value = 1; else value = -1; if GC >= ma(GC, maPeriod) then value = value + 1; else value = value - 1; if (GC - GC[ROCPeriod]) / GC[ROCPeriod] * 100 >= 0 then value = value + 1; else value = value - 1; if ema((GC-lowest(GL, stoPeriod1)) / (highest(GH, stoPeriod1) - lowest(GL, stoPeriod1)) * 100, stoPeriod2)>=50 then value = value + 1; else value = value - 1; if CCIv > 0 then value = value + 1; else value = value - 1; if ema(accum(((GC -GL)-(GH- GC))/ (GH-GL)*V), 3) - ema(accum(((GC -GL)-(GH- GC))/(GH-GL)*V), 10) >=0 then value = value + 1; else value = value - 1; if Sarv < C then value = value + 1; else value = value - 1; BW_SEVEN = value; Plot1(BW_SEVEN,"세븐 바이너리웨이브"); PlotBaseLine1(0,"기준선0"); 즐거운 하루되세요 > 산과바다 님이 쓴 글입니다. > 제목 : 갭보정 지표 > 수고가 많으십니다 BinaryWave Seven 지표의 갭보정수식을 부탁드립니다. 답변 미리 감사드립니다