커뮤니티

파라볼릭 폭

프로필 이미지
고성
2022-08-30 11:41:16
2276
글번호 161834
답변완료

첨부 이미지

Input : AF(0.02), AFMAX(0.2); Var:Direction(0),SAR_Value(Close),AF_Value(.02),HighValue(High),LowValue(Low),EP(0),CSarv(0); if 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); } } var : hh(0),LL(0),t(0); if Bdate != Bdate[1] Then Var10 = 0; if CrossUp(C,CSarv) Then { t = 1; hh = h; var1 = LL+0.5; var2 = LL+1.0; Var3 = LL+1.5; Var4 = LL+2; Var5 = LL+2.5; Var6 = LL+3; Var7 = LL+3.5; Var8 = LL+4; Var9 = LL+4.5; if Var10 == 0 or (Var10 > 0 and LL < Var10) Then var10 = LL; } if CrossDown(C,CSarv) Then { t = -1; LL = l; var1 = hh-0.5; var2 = hh-1.0; Var3 = hh-1.5; Var4 = hh-2.0; Var5 = hh-2.5; Var6 = hh-3.0; Var7 = hh-3.5; Var8 = hh-4.0; Var9 = hh-4.5; } if t == 1 Then { if hh > 0 and h > hh Then hh = h; } if t == -1 Then { if LL > 0 and l < LL Then LL = l; } if var1 > 0 Then { plot1(var1,"HL1"); plot2(var2,"HL2"); plot3(var3,"HL3"); plot4(var4,"HL4"); Plot5(Var5,"HL5"); Plot6(Var6,"HL6"); Plot7(Var7,"HL7"); Plot8(Var8,"HL8"); Plot9(Var9,"HL9"); } if Var10 > 0 Then Plot10(Var10+0.1,"l+0.1"); Else NoPlot(10); if Var10 > 0 Then Plot11(Var10-0.25,"l-0.25"); Else NoPlot(11); +0.1~-0.25 채우기 부분이 시초에 갭 보정을 하면 정상인데, 갭 보정을 안하면 전일 하락파라 영향을 받아 차이가 납니다. 전일은 출력이 안되어도 상관 없습니다. 수정 부탁드립니다.
지표
답변 3
프로필 이미지

예스스탁 예스스탁 답변

2022-08-30 13:21:58

안녕하세요 예스스탁입니다. 지표가 당일만 출력되게 수정해 드립니다. Input : AF(0.02), AFMAX(0.2); Var:Direction(0),SAR_Value(Close),AF_Value(.02),HighValue(High),LowValue(Low),EP(0),CSarv(0); if 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); } } var : hh(0),LL(0),t(0); if Bdate != Bdate[1] Then Var10 = 0; if CrossUp(C,CSarv) Then { t = 1; hh = h; var1 = LL+0.5; var2 = LL+1.0; Var3 = LL+1.5; Var4 = LL+2; Var5 = LL+2.5; Var6 = LL+3; Var7 = LL+3.5; Var8 = LL+4; Var9 = LL+4.5; if Var10 == 0 or (Var10 > 0 and LL < Var10) Then var10 = LL; } if CrossDown(C,CSarv) Then { t = -1; LL = l; var1 = hh-0.5; var2 = hh-1.0; Var3 = hh-1.5; Var4 = hh-2.0; Var5 = hh-2.5; Var6 = hh-3.0; Var7 = hh-3.5; Var8 = hh-4.0; Var9 = hh-4.5; } if t == 1 Then { if hh > 0 and h > hh Then hh = h; } if t == -1 Then { if LL > 0 and l < LL Then LL = l; } if CurrentDate == sDate Then { if var1 > 0 Then { plot1(var1,"HL1"); plot2(var2,"HL2"); plot3(var3,"HL3"); plot4(var4,"HL4"); Plot5(Var5,"HL5"); Plot6(Var6,"HL6"); Plot7(Var7,"HL7"); Plot8(Var8,"HL8"); Plot9(Var9,"HL9"); } if Var10 > 0 Then Plot10(Var10+0.1,"l+0.1"); Else NoPlot(10); if Var10 > 0 Then Plot11(Var10-0.25,"l-0.25"); Else NoPlot(11); } 즐거운 하루되세요 > 고성 님이 쓴 글입니다. > 제목 : 파라볼릭 폭 > Input : AF(0.02), AFMAX(0.2); Var:Direction(0),SAR_Value(Close),AF_Value(.02),HighValue(High),LowValue(Low),EP(0),CSarv(0); if 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); } } var : hh(0),LL(0),t(0); if Bdate != Bdate[1] Then Var10 = 0; if CrossUp(C,CSarv) Then { t = 1; hh = h; var1 = LL+0.5; var2 = LL+1.0; Var3 = LL+1.5; Var4 = LL+2; Var5 = LL+2.5; Var6 = LL+3; Var7 = LL+3.5; Var8 = LL+4; Var9 = LL+4.5; if Var10 == 0 or (Var10 > 0 and LL < Var10) Then var10 = LL; } if CrossDown(C,CSarv) Then { t = -1; LL = l; var1 = hh-0.5; var2 = hh-1.0; Var3 = hh-1.5; Var4 = hh-2.0; Var5 = hh-2.5; Var6 = hh-3.0; Var7 = hh-3.5; Var8 = hh-4.0; Var9 = hh-4.5; } if t == 1 Then { if hh > 0 and h > hh Then hh = h; } if t == -1 Then { if LL > 0 and l < LL Then LL = l; } if var1 > 0 Then { plot1(var1,"HL1"); plot2(var2,"HL2"); plot3(var3,"HL3"); plot4(var4,"HL4"); Plot5(Var5,"HL5"); Plot6(Var6,"HL6"); Plot7(Var7,"HL7"); Plot8(Var8,"HL8"); Plot9(Var9,"HL9"); } if Var10 > 0 Then Plot10(Var10+0.1,"l+0.1"); Else NoPlot(10); if Var10 > 0 Then Plot11(Var10-0.25,"l-0.25"); Else NoPlot(11); +0.1~-0.25 채우기 부분이 시초에 갭 보정을 하면 정상인데, 갭 보정을 안하면 전일 하락파라 영향을 받아 차이가 납니다. 전일은 출력이 안되어도 상관 없습니다. 수정 부탁드립니다.
프로필 이미지

고성

2022-08-30 13:52:05

> 예스스탁 님이 쓴 글입니다. > 제목 : Re : 파라볼릭 폭 > 안녕하세요 예스스탁입니다. 지표가 당일만 출력되게 수정해 드립니다. Input : AF(0.02), AFMAX(0.2); Var:Direction(0),SAR_Value(Close),AF_Value(.02),HighValue(High),LowValue(Low),EP(0),CSarv(0); if 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); } } var : hh(0),LL(0),t(0); if Bdate != Bdate[1] Then Var10 = 0; if CrossUp(C,CSarv) Then { t = 1; hh = h; var1 = LL+0.5; var2 = LL+1.0; Var3 = LL+1.5; Var4 = LL+2; Var5 = LL+2.5; Var6 = LL+3; Var7 = LL+3.5; Var8 = LL+4; Var9 = LL+4.5; if Var10 == 0 or (Var10 > 0 and LL < Var10) Then var10 = LL; } if CrossDown(C,CSarv) Then { t = -1; LL = l; var1 = hh-0.5; var2 = hh-1.0; Var3 = hh-1.5; Var4 = hh-2.0; Var5 = hh-2.5; Var6 = hh-3.0; Var7 = hh-3.5; Var8 = hh-4.0; Var9 = hh-4.5; } if t == 1 Then { if hh > 0 and h > hh Then hh = h; } if t == -1 Then { if LL > 0 and l < LL Then LL = l; } if CurrentDate == sDate Then { if var1 > 0 Then { plot1(var1,"HL1"); plot2(var2,"HL2"); plot3(var3,"HL3"); plot4(var4,"HL4"); Plot5(Var5,"HL5"); Plot6(Var6,"HL6"); Plot7(Var7,"HL7"); Plot8(Var8,"HL8"); Plot9(Var9,"HL9"); } if Var10 > 0 Then Plot10(Var10+0.1,"l+0.1"); Else NoPlot(10); if Var10 > 0 Then Plot11(Var10-0.25,"l-0.25"); Else NoPlot(11); } 즐거운 하루되세요 > 고성 님이 쓴 글입니다. > 제목 : 파라볼릭 폭 > Input : AF(0.02), AFMAX(0.2); Var:Direction(0),SAR_Value(Close),AF_Value(.02),HighValue(High),LowValue(Low),EP(0),CSarv(0); if 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); } } var : hh(0),LL(0),t(0); if Bdate != Bdate[1] Then Var10 = 0; if CrossUp(C,CSarv) Then { t = 1; hh = h; var1 = LL+0.5; var2 = LL+1.0; Var3 = LL+1.5; Var4 = LL+2; Var5 = LL+2.5; Var6 = LL+3; Var7 = LL+3.5; Var8 = LL+4; Var9 = LL+4.5; if Var10 == 0 or (Var10 > 0 and LL < Var10) Then var10 = LL; } if CrossDown(C,CSarv) Then { t = -1; LL = l; var1 = hh-0.5; var2 = hh-1.0; Var3 = hh-1.5; Var4 = hh-2.0; Var5 = hh-2.5; Var6 = hh-3.0; Var7 = hh-3.5; Var8 = hh-4.0; Var9 = hh-4.5; } if t == 1 Then { if hh > 0 and h > hh Then hh = h; } if t == -1 Then { if LL > 0 and l < LL Then LL = l; } if var1 > 0 Then { plot1(var1,"HL1"); plot2(var2,"HL2"); plot3(var3,"HL3"); plot4(var4,"HL4"); Plot5(Var5,"HL5"); Plot6(Var6,"HL6"); Plot7(Var7,"HL7"); Plot8(Var8,"HL8"); Plot9(Var9,"HL9"); } if Var10 > 0 Then Plot10(Var10+0.1,"l+0.1"); Else NoPlot(10); if Var10 > 0 Then Plot11(Var10-0.25,"l-0.25"); Else NoPlot(11); +0.1~-0.25 채우기 부분이 시초에 갭 보정을 하면 정상인데, 갭 보정을 안하면 전일 하락파라 영향을 받아 차이가 납니다. 전일은 출력이 안되어도 상관 없습니다. 수정 부탁드립니다. [재문의] 당일만 출력은 되는데 갭 보정 안하면 정상 출력이 안됩니다.
프로필 이미지

예스스탁 예스스탁 답변

2022-08-30 13:57:25

안녕하세요 예스스탁입니다. 채우기는 수식안에서 설정하는 부분이 아니라 속성에서 지정하는 부분으로 수식안에서 제어가 가능하지 않습니다. 당일만 출력하게 하는 내용으로 처리가 안되시면 별도로 방법이 없을것 같습니다. 도움을 드리지 못해 죄송합니다. 즐거운 하루되세요 > 고성 님이 쓴 글입니다. > 제목 : Re : Re : 파라볼릭 폭 > > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 파라볼릭 폭 > 안녕하세요 예스스탁입니다. 지표가 당일만 출력되게 수정해 드립니다. Input : AF(0.02), AFMAX(0.2); Var:Direction(0),SAR_Value(Close),AF_Value(.02),HighValue(High),LowValue(Low),EP(0),CSarv(0); if 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); } } var : hh(0),LL(0),t(0); if Bdate != Bdate[1] Then Var10 = 0; if CrossUp(C,CSarv) Then { t = 1; hh = h; var1 = LL+0.5; var2 = LL+1.0; Var3 = LL+1.5; Var4 = LL+2; Var5 = LL+2.5; Var6 = LL+3; Var7 = LL+3.5; Var8 = LL+4; Var9 = LL+4.5; if Var10 == 0 or (Var10 > 0 and LL < Var10) Then var10 = LL; } if CrossDown(C,CSarv) Then { t = -1; LL = l; var1 = hh-0.5; var2 = hh-1.0; Var3 = hh-1.5; Var4 = hh-2.0; Var5 = hh-2.5; Var6 = hh-3.0; Var7 = hh-3.5; Var8 = hh-4.0; Var9 = hh-4.5; } if t == 1 Then { if hh > 0 and h > hh Then hh = h; } if t == -1 Then { if LL > 0 and l < LL Then LL = l; } if CurrentDate == sDate Then { if var1 > 0 Then { plot1(var1,"HL1"); plot2(var2,"HL2"); plot3(var3,"HL3"); plot4(var4,"HL4"); Plot5(Var5,"HL5"); Plot6(Var6,"HL6"); Plot7(Var7,"HL7"); Plot8(Var8,"HL8"); Plot9(Var9,"HL9"); } if Var10 > 0 Then Plot10(Var10+0.1,"l+0.1"); Else NoPlot(10); if Var10 > 0 Then Plot11(Var10-0.25,"l-0.25"); Else NoPlot(11); } 즐거운 하루되세요 > 고성 님이 쓴 글입니다. > 제목 : 파라볼릭 폭 > Input : AF(0.02), AFMAX(0.2); Var:Direction(0),SAR_Value(Close),AF_Value(.02),HighValue(High),LowValue(Low),EP(0),CSarv(0); if 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); } } var : hh(0),LL(0),t(0); if Bdate != Bdate[1] Then Var10 = 0; if CrossUp(C,CSarv) Then { t = 1; hh = h; var1 = LL+0.5; var2 = LL+1.0; Var3 = LL+1.5; Var4 = LL+2; Var5 = LL+2.5; Var6 = LL+3; Var7 = LL+3.5; Var8 = LL+4; Var9 = LL+4.5; if Var10 == 0 or (Var10 > 0 and LL < Var10) Then var10 = LL; } if CrossDown(C,CSarv) Then { t = -1; LL = l; var1 = hh-0.5; var2 = hh-1.0; Var3 = hh-1.5; Var4 = hh-2.0; Var5 = hh-2.5; Var6 = hh-3.0; Var7 = hh-3.5; Var8 = hh-4.0; Var9 = hh-4.5; } if t == 1 Then { if hh > 0 and h > hh Then hh = h; } if t == -1 Then { if LL > 0 and l < LL Then LL = l; } if var1 > 0 Then { plot1(var1,"HL1"); plot2(var2,"HL2"); plot3(var3,"HL3"); plot4(var4,"HL4"); Plot5(Var5,"HL5"); Plot6(Var6,"HL6"); Plot7(Var7,"HL7"); Plot8(Var8,"HL8"); Plot9(Var9,"HL9"); } if Var10 > 0 Then Plot10(Var10+0.1,"l+0.1"); Else NoPlot(10); if Var10 > 0 Then Plot11(Var10-0.25,"l-0.25"); Else NoPlot(11); +0.1~-0.25 채우기 부분이 시초에 갭 보정을 하면 정상인데, 갭 보정을 안하면 전일 하락파라 영향을 받아 차이가 납니다. 전일은 출력이 안되어도 상관 없습니다. 수정 부탁드립니다. [재문의] 당일만 출력은 되는데 갭 보정 안하면 정상 출력이 안됩니다.