커뮤니티

지표좀 검토해 주세요

프로필 이미지
산과바다
2014-04-18 10:40:30
257
글번호 74534
답변완료
번호 13892로 갭보정 볼린저밴드와 갭보정 파라볼릭 지표를 올려주셨는데, 적용해 보니 갭보정 볼린저밴드 지표는 되는데, 갭보정 파라볼릭 지표가 안되네요 그때 올려주신 것은 갭보정 파라볼릭 지표는 다음과 같은데 다시 한번 검토해 주시기 바랍니다. 갭보정 파라볼릭 Input: AF(0.02), AFMAX(0.2); Var : Direction(0), SAR_Value(Close), AF_Value(.02), HighValue(High), LowValue(Low), EP(0),GCSAR(0); var : gap(0),sumgap(0),GO(0),GH(0),GL(0),GC(0); if date!=date[1] then { // 날짜가 변경되는 봉에서(분봉에서 첫번째 봉) gap = Open-Close[1]; // 일간갭 sumGap = sumGap+gap; // 일간갭 누적 } GO = O - sumGap;// 갭보정 시가 GH = H - sumGap;// 갭보정 고가 GL = L - sumGap;// 갭보정 저가 GC = C - sumGap; // 갭보정 종가 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 Close < 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 GC > SAR_Value then { Direction = 1; SAR_Value = EP; AF_Value = 0; EP = 0; HighValue = GH; } } GCSar = 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; } } GCSar = 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; GCSar = SAR_Value; } } if Direction == -1 then { if GC > GC[1] then { Direction = 1; SAR_Value = LowValue; GCSar = SAR_Value; } } } LowValue = min(GL,LowValue); HighValue = max(GH,HighValue); } } plot1(GCSar);
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2014-04-21 13:27:03

안녕하세요 예스스탁입니다. GC가 사용되어야 하는데 Close가 그대로 사용된 곳이 있어 수정했습니다. Input: AF(0.02), AFMAX(0.2); Var : Direction(0), SAR_Value(Close), AF_Value(.02), HighValue(High), LowValue(Low), EP(0),GCSAR(0); var : gap(0),sumgap(0),GO(0),GH(0),GL(0),GC(0); if date!=date[1] then { // 날짜가 변경되는 봉에서(분봉에서 첫번째 봉) gap = Open-Close[1]; // 일간갭 sumGap = sumGap+gap; // 일간갭 누적 } GO = O - sumGap;// 갭보정 시가 GH = H - sumGap;// 갭보정 고가 GL = L - sumGap;// 갭보정 저가 GC = C - sumGap; // 갭보정 종가 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 GC < 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 GC > SAR_Value then { Direction = 1; SAR_Value = EP; AF_Value = 0; EP = 0; HighValue = GH; } } GCSar = 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; } } GCSar = 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; GCSar = SAR_Value; } } if Direction == -1 then { if GC > GC[1] then { Direction = 1; SAR_Value = LowValue; GCSar = SAR_Value; } } } LowValue = min(GL,LowValue); HighValue = max(GH,HighValue); } } plot1(GCSar); 즐거운 하루되세요 > 산과바다 님이 쓴 글입니다. > 제목 : 지표좀 검토해 주세요 > 번호 13892로 갭보정 볼린저밴드와 갭보정 파라볼릭 지표를 올려주셨는데, 적용해 보니 갭보정 볼린저밴드 지표는 되는데, 갭보정 파라볼릭 지표가 안되네요 그때 올려주신 것은 갭보정 파라볼릭 지표는 다음과 같은데 다시 한번 검토해 주시기 바랍니다. 갭보정 파라볼릭 Input: AF(0.02), AFMAX(0.2); Var : Direction(0), SAR_Value(Close), AF_Value(.02), HighValue(High), LowValue(Low), EP(0),GCSAR(0); var : gap(0),sumgap(0),GO(0),GH(0),GL(0),GC(0); if date!=date[1] then { // 날짜가 변경되는 봉에서(분봉에서 첫번째 봉) gap = Open-Close[1]; // 일간갭 sumGap = sumGap+gap; // 일간갭 누적 } GO = O - sumGap;// 갭보정 시가 GH = H - sumGap;// 갭보정 고가 GL = L - sumGap;// 갭보정 저가 GC = C - sumGap; // 갭보정 종가 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 Close < 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 GC > SAR_Value then { Direction = 1; SAR_Value = EP; AF_Value = 0; EP = 0; HighValue = GH; } } GCSar = 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; } } GCSar = 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; GCSar = SAR_Value; } } if Direction == -1 then { if GC > GC[1] then { Direction = 1; SAR_Value = LowValue; GCSar = SAR_Value; } } } LowValue = min(GL,LowValue); HighValue = max(GH,HighValue); } } plot1(GCSar);