커뮤니티

수식 추가 부탁드립니다

프로필 이미지
유튜버
2021-09-29 14:02:09
884
글번호 152547
답변완료
아래 수식은 전일과 분리된 당일 파라볼릭 수식을 만들어주신 것입니다 아래 수식을 기반으로 1)전일과 분리된 당일 파라볼릭 양전환시 양전환 캔들 고가와 당일 저가 대칭값 2)전일과 분리된 당일 파라볼릭 음전환시 음전환 캔들 저가와 당일 고가 대칭값 수식 추가 부탁드립니다. 감사합니다 ----------------------------------------------------------------------------- Input : AF(0.02), AFMAX(0.2); Var : Direction(0), SAR_Value(Close), AF_Value(.02), HighValue(High), LowValue(Low), EP(0); var : 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); } } Plot1(CSarv,iff(C>CSaRV,RED,BLUE));
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2021-09-30 10:08:20

안녕하세요 예스스탁입니다. Input : AF(0.02), AFMAX(0.2); Var : Direction(0), SAR_Value(Close), AF_Value(.02), HighValue(High), LowValue(Low), EP(0); var : CSarv(0); if Bdate != Bdate[1] Then { Direction = 0; SAR_Value = C; AF_Value = 0.02; HighValue = H; LowValue = L; EP = 0; var1 = 0; Var2 = 0; Var3 = 0; Var4 = 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] and CrossUp(C,CSarv) Then { var1 = H; Var2 = DayLow; } if Bdate == Bdate[1] and CrossDown(C,CSarv) Then { var3 = DayHigh; Var4 = L; } Plot1(CSarv,"당일종가파라볼릭",iff(C>CSaRV,RED,BLUE)); if var1 > 0 and Var2 > 0 Then { Plot2(var1); Plot3(var2); Plot4(var1+abs(Var1-Var2)); Plot5(var2-abs(Var1-Var2)); } Else { NoPlot(2); NoPlot(3); NoPlot(4); NoPlot(5); } if var3 > 0 and Var4 > 0 Then { Plot6(var3); Plot7(var4); Plot8(var3+abs(Var3-Var3)); Plot9(var4-abs(Var4-Var4)); } Else { NoPlot(6); NoPlot(7); NoPlot(8); NoPlot(9); } 즐거운 하루되세요 > 유튜버 님이 쓴 글입니다. > 제목 : 수식 추가 부탁드립니다 > 아래 수식은 전일과 분리된 당일 파라볼릭 수식을 만들어주신 것입니다 아래 수식을 기반으로 1)전일과 분리된 당일 파라볼릭 양전환시 양전환 캔들 고가와 당일 저가 대칭값 2)전일과 분리된 당일 파라볼릭 음전환시 음전환 캔들 저가와 당일 고가 대칭값 수식 추가 부탁드립니다. 감사합니다 ----------------------------------------------------------------------------- Input : AF(0.02), AFMAX(0.2); Var : Direction(0), SAR_Value(Close), AF_Value(.02), HighValue(High), LowValue(Low), EP(0); var : 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); } } Plot1(CSarv,iff(C>CSaRV,RED,BLUE));