커뮤니티

서식 부탁드립니다

프로필 이미지
dkfvkrh7
2019-10-21 13:33:36
213
글번호 132977
답변완료
안녕하세요 지표서식이 잘 적용되지 않아 부탁드리려고 합니다 아래와 같이 미결재약정을 현재수량 - 당일 첫봉의 마감수량의 당일 증감수량으로 미결재약정 파라볼릭 적용하려 하는데 미결재 잔량선이 파라볼릭 선을 상향돌파하거나 하향돌파하여도 파라볼릭선이 반대로 꺽어지지 않고 처음 향한 방향으로 호를 그리며 멀어져 갑니다 도움 부탁 드립니다 감사합니다 Input : AF(0.02), AFMAX(0.2),period(2); Input : p(0); var : OIV(0),oi1(0); OIV = Oi; var : Diff(0), mav(0); Diff = (OI - oi1) ; mav = ma(Diff,P); Var : Direction(0), SAR_Value(Diff), AF_Value(.02), HighValue(diff), LowValue(diff), EP(0),CSARV(0); if Diff == 0 Then Diff = Diff[1]; if EP != 0 Then { if Direction == 1 then { EP = HighValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if Diff > HighValue then { HighValue = Diff; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } if Diff < SAR_Value then { Direction = -1; SAR_Value = EP; AF_Value = 0; EP = 0; LowValue = Diff ; } } else { EP = LowValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if Diff < LowValue then { LowValue = Diff; AF_Value = AF_Value + Af; if AF_Value >= AFMAX then AF_Value = AFMAX; } if Diff > SAR_Value then { Direction = 1; SAR_Value = EP; AF_Value = 0; EP = 0; HighValue = Diff; } } 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 Diff > HighValue then { HighValue = Diff; 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 Diff < LowValue then { LowValue = Diff; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } } CSarv = SAR_Value; } else { if Direction == 0 then { if Diff > Diff[1] then Direction = 1; else if Diff < Diff[1] then Direction = -1; } else { if Direction == 1 then { if Diff < Diff[1] then { Direction = -1; SAR_Value = HighValue; CSarv = SAR_Value; } } if Direction == -1 then { if Diff > Diff[1] then { Direction = 1; SAR_Value = LowValue; CSarv = SAR_Value; } } } LowValue = min(Diff, LowValue); HighValue = max(Diff, HighValue); } } plot1(diff,"(OI - oi1)"); plot2(CSARv,"diff파라볼릭"); //속성에서 점그래프
지표
답변 5
프로필 이미지

예스스탁 예스스탁 답변

2019-10-21 13:42:08

안녕하세요 예스스탁입니다. 수식에 첫봉의 미결제약정값이 없습니다. 변수만 oi1으로 선언이 되어 있고 값할당이 없습니다. Input : AF(0.02), AFMAX(0.2),period(2); Input : p(0); var : OIV(0),oi1(0); var : Diff(0), mav(0); Var : Direction(0), SAR_Value(Diff), AF_Value(.02), HighValue(diff), LowValue(diff), EP(0),CSARV(0); OIV = Oi; if bdate != bdate[1] Then oi1 = oiv; Diff = (OI - oi1) ; mav = ma(Diff,P); if Diff == 0 Then Diff = Diff[1]; if EP != 0 Then { if Direction == 1 then { EP = HighValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if Diff > HighValue then { HighValue = Diff; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } if Diff < SAR_Value then { Direction = -1; SAR_Value = EP; AF_Value = 0; EP = 0; LowValue = Diff ; } } else { EP = LowValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if Diff < LowValue then { LowValue = Diff; AF_Value = AF_Value + Af; if AF_Value >= AFMAX then AF_Value = AFMAX; } if Diff > SAR_Value then { Direction = 1; SAR_Value = EP; AF_Value = 0; EP = 0; HighValue = Diff; } } 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 Diff > HighValue then { HighValue = Diff; 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 Diff < LowValue then { LowValue = Diff; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } } CSarv = SAR_Value; } else { if Direction == 0 then { if Diff > Diff[1] then Direction = 1; else if Diff < Diff[1] then Direction = -1; } else { if Direction == 1 then { if Diff < Diff[1] then { Direction = -1; SAR_Value = HighValue; CSarv = SAR_Value; } } if Direction == -1 then { if Diff > Diff[1] then { Direction = 1; SAR_Value = LowValue; CSarv = SAR_Value; } } } LowValue = min(Diff, LowValue); HighValue = max(Diff, HighValue); } } plot1(diff,"(OI - oi1)"); plot2(CSARv,"diff파라볼릭"); //속성에서 점그래프 즐거운 하루되세요 > dkfvkrh7 님이 쓴 글입니다. > 제목 : 서식 부탁드립니다 > 안녕하세요 지표서식이 잘 적용되지 않아 부탁드리려고 합니다 아래와 같이 미결재약정을 현재수량 - 당일 첫봉의 마감수량의 당일 증감수량으로 미결재약정 파라볼릭 적용하려 하는데 미결재 잔량선이 파라볼릭 선을 상향돌파하거나 하향돌파하여도 파라볼릭선이 반대로 꺽어지지 않고 처음 향한 방향으로 호를 그리며 멀어져 갑니다 도움 부탁 드립니다 감사합니다 Input : AF(0.02), AFMAX(0.2),period(2); Input : p(0); var : OIV(0),oi1(0); OIV = Oi; var : Diff(0), mav(0); Diff = (OI - oi1) ; mav = ma(Diff,P); Var : Direction(0), SAR_Value(Diff), AF_Value(.02), HighValue(diff), LowValue(diff), EP(0),CSARV(0); if Diff == 0 Then Diff = Diff[1]; if EP != 0 Then { if Direction == 1 then { EP = HighValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if Diff > HighValue then { HighValue = Diff; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } if Diff < SAR_Value then { Direction = -1; SAR_Value = EP; AF_Value = 0; EP = 0; LowValue = Diff ; } } else { EP = LowValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if Diff < LowValue then { LowValue = Diff; AF_Value = AF_Value + Af; if AF_Value >= AFMAX then AF_Value = AFMAX; } if Diff > SAR_Value then { Direction = 1; SAR_Value = EP; AF_Value = 0; EP = 0; HighValue = Diff; } } 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 Diff > HighValue then { HighValue = Diff; 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 Diff < LowValue then { LowValue = Diff; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } } CSarv = SAR_Value; } else { if Direction == 0 then { if Diff > Diff[1] then Direction = 1; else if Diff < Diff[1] then Direction = -1; } else { if Direction == 1 then { if Diff < Diff[1] then { Direction = -1; SAR_Value = HighValue; CSarv = SAR_Value; } } if Direction == -1 then { if Diff > Diff[1] then { Direction = 1; SAR_Value = LowValue; CSarv = SAR_Value; } } } LowValue = min(Diff, LowValue); HighValue = max(Diff, HighValue); } } plot1(diff,"(OI - oi1)"); plot2(CSARv,"diff파라볼릭"); //속성에서 점그래프
프로필 이미지

dkfvkrh7

2019-10-21 15:00:02

제가 뭘 잘못 적용하고 있을까요 새로 적용해보니 같은 현상이 나타납니다 선물지수 1분으로 하여 정규장으로 하였습니다 부탁드립니다 > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 서식 부탁드립니다 > 안녕하세요 예스스탁입니다. 수식에 첫봉의 미결제약정값이 없습니다. 변수만 oi1으로 선언이 되어 있고 값할당이 없습니다. Input : AF(0.02), AFMAX(0.2),period(2); Input : p(0); var : OIV(0),oi1(0); var : Diff(0), mav(0); Var : Direction(0), SAR_Value(Diff), AF_Value(.02), HighValue(diff), LowValue(diff), EP(0),CSARV(0); OIV = Oi; if bdate != bdate[1] Then oi1 = oiv; Diff = (OI - oi1) ; mav = ma(Diff,P); if Diff == 0 Then Diff = Diff[1]; if EP != 0 Then { if Direction == 1 then { EP = HighValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if Diff > HighValue then { HighValue = Diff; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } if Diff < SAR_Value then { Direction = -1; SAR_Value = EP; AF_Value = 0; EP = 0; LowValue = Diff ; } } else { EP = LowValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if Diff < LowValue then { LowValue = Diff; AF_Value = AF_Value + Af; if AF_Value >= AFMAX then AF_Value = AFMAX; } if Diff > SAR_Value then { Direction = 1; SAR_Value = EP; AF_Value = 0; EP = 0; HighValue = Diff; } } 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 Diff > HighValue then { HighValue = Diff; 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 Diff < LowValue then { LowValue = Diff; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } } CSarv = SAR_Value; } else { if Direction == 0 then { if Diff > Diff[1] then Direction = 1; else if Diff < Diff[1] then Direction = -1; } else { if Direction == 1 then { if Diff < Diff[1] then { Direction = -1; SAR_Value = HighValue; CSarv = SAR_Value; } } if Direction == -1 then { if Diff > Diff[1] then { Direction = 1; SAR_Value = LowValue; CSarv = SAR_Value; } } } LowValue = min(Diff, LowValue); HighValue = max(Diff, HighValue); } } plot1(diff,"(OI - oi1)"); plot2(CSARv,"diff파라볼릭"); //속성에서 점그래프 즐거운 하루되세요 > dkfvkrh7 님이 쓴 글입니다. > 제목 : 서식 부탁드립니다 > 안녕하세요 지표서식이 잘 적용되지 않아 부탁드리려고 합니다 아래와 같이 미결재약정을 현재수량 - 당일 첫봉의 마감수량의 당일 증감수량으로 미결재약정 파라볼릭 적용하려 하는데 미결재 잔량선이 파라볼릭 선을 상향돌파하거나 하향돌파하여도 파라볼릭선이 반대로 꺽어지지 않고 처음 향한 방향으로 호를 그리며 멀어져 갑니다 도움 부탁 드립니다 감사합니다 Input : AF(0.02), AFMAX(0.2),period(2); Input : p(0); var : OIV(0),oi1(0); OIV = Oi; var : Diff(0), mav(0); Diff = (OI - oi1) ; mav = ma(Diff,P); Var : Direction(0), SAR_Value(Diff), AF_Value(.02), HighValue(diff), LowValue(diff), EP(0),CSARV(0); if Diff == 0 Then Diff = Diff[1]; if EP != 0 Then { if Direction == 1 then { EP = HighValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if Diff > HighValue then { HighValue = Diff; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } if Diff < SAR_Value then { Direction = -1; SAR_Value = EP; AF_Value = 0; EP = 0; LowValue = Diff ; } } else { EP = LowValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if Diff < LowValue then { LowValue = Diff; AF_Value = AF_Value + Af; if AF_Value >= AFMAX then AF_Value = AFMAX; } if Diff > SAR_Value then { Direction = 1; SAR_Value = EP; AF_Value = 0; EP = 0; HighValue = Diff; } } 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 Diff > HighValue then { HighValue = Diff; 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 Diff < LowValue then { LowValue = Diff; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } } CSarv = SAR_Value; } else { if Direction == 0 then { if Diff > Diff[1] then Direction = 1; else if Diff < Diff[1] then Direction = -1; } else { if Direction == 1 then { if Diff < Diff[1] then { Direction = -1; SAR_Value = HighValue; CSarv = SAR_Value; } } if Direction == -1 then { if Diff > Diff[1] then { Direction = 1; SAR_Value = LowValue; CSarv = SAR_Value; } } } LowValue = min(Diff, LowValue); HighValue = max(Diff, HighValue); } } plot1(diff,"(OI - oi1)"); plot2(CSARv,"diff파라볼릭"); //속성에서 점그래프
프로필 이미지

예스스탁 예스스탁 답변

2019-10-21 15:40:07

안녕하세요 예스스탁입니다. 1 차트의 최초봉에는 전봉이 없어 OI1이 저장되지 않아 첫봉에서도 값 저장되게 변경했습니다. diff파라볼릭을 상승시 빨강, 하락시 파랑으로 색상을 지정했습니다. 점그래프로 지정해서 보시면 됩니다. 위 내용을 제외하면 특별히 수정해 드릴부분이 보이지 않습니다. 2 diff가 첫봉에는 값이 0인데 아래 수식 내용이 있어서 첫봉의 값이 전일 마지막봉의 중가값으로 책정이 됩니다. 불필요한 내용이면 삭제하시기 바랍니다. if Diff == 0 Then Diff = Diff[1]; 3 Input : AF(0.02), AFMAX(0.2),period(2); Input : p(0); var : OIV(0),oi1(0); var : Diff(0), mav(0); Var : Direction(0), SAR_Value(Diff), AF_Value(.02), HighValue(diff), LowValue(diff), EP(0),CSARV(0); OIV = Oi; if bdate != bdate[1] or index == 0 Then oi1 = oiv; Diff = (OI - oi1) ; mav = ma(Diff,P); if Diff == 0 Then Diff = Diff[1]; if EP != 0 Then { if Direction == 1 then { EP = HighValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if Diff > HighValue then { HighValue = Diff; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } if Diff < SAR_Value then { Direction = -1; SAR_Value = EP; AF_Value = 0; EP = 0; LowValue = Diff ; } } else { EP = LowValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if Diff < LowValue then { LowValue = Diff; AF_Value = AF_Value + Af; if AF_Value >= AFMAX then AF_Value = AFMAX; } if Diff > SAR_Value then { Direction = 1; SAR_Value = EP; AF_Value = 0; EP = 0; HighValue = Diff; } } 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 Diff > HighValue then { HighValue = Diff; 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 Diff < LowValue then { LowValue = Diff; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } } CSarv = SAR_Value; } else { if Direction == 0 then { if Diff > Diff[1] then Direction = 1; else if Diff < Diff[1] then Direction = -1; } else { if Direction == 1 then { if Diff < Diff[1] then { Direction = -1; SAR_Value = HighValue; CSarv = SAR_Value; } } if Direction == -1 then { if Diff > Diff[1] then { Direction = 1; SAR_Value = LowValue; CSarv = SAR_Value; } } } LowValue = min(Diff, LowValue); HighValue = max(Diff, HighValue); } } plot1(diff,"(OI - oi1)"); plot2(CSARv,"diff파라볼릭",iff(CSARv>CSARv[1],RED,blue)); //속성에서 점그래프 즐거운 하루되세요 > dkfvkrh7 님이 쓴 글입니다. > 제목 : Re : Re : 서식 부탁드립니다 > 제가 뭘 잘못 적용하고 있을까요 새로 적용해보니 같은 현상이 나타납니다 선물지수 1분으로 하여 정규장으로 하였습니다 부탁드립니다 > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 서식 부탁드립니다 > 안녕하세요 예스스탁입니다. 수식에 첫봉의 미결제약정값이 없습니다. 변수만 oi1으로 선언이 되어 있고 값할당이 없습니다. Input : AF(0.02), AFMAX(0.2),period(2); Input : p(0); var : OIV(0),oi1(0); var : Diff(0), mav(0); Var : Direction(0), SAR_Value(Diff), AF_Value(.02), HighValue(diff), LowValue(diff), EP(0),CSARV(0); OIV = Oi; if bdate != bdate[1] Then oi1 = oiv; Diff = (OI - oi1) ; mav = ma(Diff,P); if Diff == 0 Then Diff = Diff[1]; if EP != 0 Then { if Direction == 1 then { EP = HighValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if Diff > HighValue then { HighValue = Diff; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } if Diff < SAR_Value then { Direction = -1; SAR_Value = EP; AF_Value = 0; EP = 0; LowValue = Diff ; } } else { EP = LowValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if Diff < LowValue then { LowValue = Diff; AF_Value = AF_Value + Af; if AF_Value >= AFMAX then AF_Value = AFMAX; } if Diff > SAR_Value then { Direction = 1; SAR_Value = EP; AF_Value = 0; EP = 0; HighValue = Diff; } } 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 Diff > HighValue then { HighValue = Diff; 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 Diff < LowValue then { LowValue = Diff; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } } CSarv = SAR_Value; } else { if Direction == 0 then { if Diff > Diff[1] then Direction = 1; else if Diff < Diff[1] then Direction = -1; } else { if Direction == 1 then { if Diff < Diff[1] then { Direction = -1; SAR_Value = HighValue; CSarv = SAR_Value; } } if Direction == -1 then { if Diff > Diff[1] then { Direction = 1; SAR_Value = LowValue; CSarv = SAR_Value; } } } LowValue = min(Diff, LowValue); HighValue = max(Diff, HighValue); } } plot1(diff,"(OI - oi1)"); plot2(CSARv,"diff파라볼릭"); //속성에서 점그래프 즐거운 하루되세요 > dkfvkrh7 님이 쓴 글입니다. > 제목 : 서식 부탁드립니다 > 안녕하세요 지표서식이 잘 적용되지 않아 부탁드리려고 합니다 아래와 같이 미결재약정을 현재수량 - 당일 첫봉의 마감수량의 당일 증감수량으로 미결재약정 파라볼릭 적용하려 하는데 미결재 잔량선이 파라볼릭 선을 상향돌파하거나 하향돌파하여도 파라볼릭선이 반대로 꺽어지지 않고 처음 향한 방향으로 호를 그리며 멀어져 갑니다 도움 부탁 드립니다 감사합니다 Input : AF(0.02), AFMAX(0.2),period(2); Input : p(0); var : OIV(0),oi1(0); OIV = Oi; var : Diff(0), mav(0); Diff = (OI - oi1) ; mav = ma(Diff,P); Var : Direction(0), SAR_Value(Diff), AF_Value(.02), HighValue(diff), LowValue(diff), EP(0),CSARV(0); if Diff == 0 Then Diff = Diff[1]; if EP != 0 Then { if Direction == 1 then { EP = HighValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if Diff > HighValue then { HighValue = Diff; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } if Diff < SAR_Value then { Direction = -1; SAR_Value = EP; AF_Value = 0; EP = 0; LowValue = Diff ; } } else { EP = LowValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if Diff < LowValue then { LowValue = Diff; AF_Value = AF_Value + Af; if AF_Value >= AFMAX then AF_Value = AFMAX; } if Diff > SAR_Value then { Direction = 1; SAR_Value = EP; AF_Value = 0; EP = 0; HighValue = Diff; } } 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 Diff > HighValue then { HighValue = Diff; 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 Diff < LowValue then { LowValue = Diff; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } } CSarv = SAR_Value; } else { if Direction == 0 then { if Diff > Diff[1] then Direction = 1; else if Diff < Diff[1] then Direction = -1; } else { if Direction == 1 then { if Diff < Diff[1] then { Direction = -1; SAR_Value = HighValue; CSarv = SAR_Value; } } if Direction == -1 then { if Diff > Diff[1] then { Direction = 1; SAR_Value = LowValue; CSarv = SAR_Value; } } } LowValue = min(Diff, LowValue); HighValue = max(Diff, HighValue); } } plot1(diff,"(OI - oi1)"); plot2(CSARv,"diff파라볼릭"); //속성에서 점그래프
프로필 이미지

dkfvkrh7

2019-10-21 16:24:08

번거롭게 해드려서 죄송합니다 한가지만 더 부탁 드리겠습니다 data2에 선물을 놓고 data1 + data2 의 두 값으로 파라볼릭 나타내려고 하는데 Diff = (OI - oi1) + (data2(c)) ;로 해서 실행하니까 안되는것 같습니다 data2의 첫봉값을 따로 저장해서 하는지 그럴경우 어떻게 하는지 부탁드립니다 감사합니다 > 예스스탁 님이 쓴 글입니다. > 제목 : Re : Re : Re : 서식 부탁드립니다 > 안녕하세요 예스스탁입니다. 1 차트의 최초봉에는 전봉이 없어 OI1이 저장되지 않아 첫봉에서도 값 저장되게 변경했습니다. diff파라볼릭을 상승시 빨강, 하락시 파랑으로 색상을 지정했습니다. 점그래프로 지정해서 보시면 됩니다. 위 내용을 제외하면 특별히 수정해 드릴부분이 보이지 않습니다. 2 diff가 첫봉에는 값이 0인데 아래 수식 내용이 있어서 첫봉의 값이 전일 마지막봉의 중가값으로 책정이 됩니다. 불필요한 내용이면 삭제하시기 바랍니다. if Diff == 0 Then Diff = Diff[1]; 3 Input : AF(0.02), AFMAX(0.2),period(2); Input : p(0); var : OIV(0),oi1(0); var : Diff(0), mav(0); Var : Direction(0), SAR_Value(Diff), AF_Value(.02), HighValue(diff), LowValue(diff), EP(0),CSARV(0); OIV = Oi; if bdate != bdate[1] or index == 0 Then oi1 = oiv; Diff = (OI - oi1) ; mav = ma(Diff,P); if Diff == 0 Then Diff = Diff[1]; if EP != 0 Then { if Direction == 1 then { EP = HighValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if Diff > HighValue then { HighValue = Diff; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } if Diff < SAR_Value then { Direction = -1; SAR_Value = EP; AF_Value = 0; EP = 0; LowValue = Diff ; } } else { EP = LowValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if Diff < LowValue then { LowValue = Diff; AF_Value = AF_Value + Af; if AF_Value >= AFMAX then AF_Value = AFMAX; } if Diff > SAR_Value then { Direction = 1; SAR_Value = EP; AF_Value = 0; EP = 0; HighValue = Diff; } } 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 Diff > HighValue then { HighValue = Diff; 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 Diff < LowValue then { LowValue = Diff; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } } CSarv = SAR_Value; } else { if Direction == 0 then { if Diff > Diff[1] then Direction = 1; else if Diff < Diff[1] then Direction = -1; } else { if Direction == 1 then { if Diff < Diff[1] then { Direction = -1; SAR_Value = HighValue; CSarv = SAR_Value; } } if Direction == -1 then { if Diff > Diff[1] then { Direction = 1; SAR_Value = LowValue; CSarv = SAR_Value; } } } LowValue = min(Diff, LowValue); HighValue = max(Diff, HighValue); } } plot1(diff,"(OI - oi1)"); plot2(CSARv,"diff파라볼릭",iff(CSARv>CSARv[1],RED,blue)); //속성에서 점그래프 즐거운 하루되세요 > dkfvkrh7 님이 쓴 글입니다. > 제목 : Re : Re : 서식 부탁드립니다 > 제가 뭘 잘못 적용하고 있을까요 새로 적용해보니 같은 현상이 나타납니다 선물지수 1분으로 하여 정규장으로 하였습니다 부탁드립니다 > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 서식 부탁드립니다 > 안녕하세요 예스스탁입니다. 수식에 첫봉의 미결제약정값이 없습니다. 변수만 oi1으로 선언이 되어 있고 값할당이 없습니다. Input : AF(0.02), AFMAX(0.2),period(2); Input : p(0); var : OIV(0),oi1(0); var : Diff(0), mav(0); Var : Direction(0), SAR_Value(Diff), AF_Value(.02), HighValue(diff), LowValue(diff), EP(0),CSARV(0); OIV = Oi; if bdate != bdate[1] Then oi1 = oiv; Diff = (OI - oi1) ; mav = ma(Diff,P); if Diff == 0 Then Diff = Diff[1]; if EP != 0 Then { if Direction == 1 then { EP = HighValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if Diff > HighValue then { HighValue = Diff; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } if Diff < SAR_Value then { Direction = -1; SAR_Value = EP; AF_Value = 0; EP = 0; LowValue = Diff ; } } else { EP = LowValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if Diff < LowValue then { LowValue = Diff; AF_Value = AF_Value + Af; if AF_Value >= AFMAX then AF_Value = AFMAX; } if Diff > SAR_Value then { Direction = 1; SAR_Value = EP; AF_Value = 0; EP = 0; HighValue = Diff; } } 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 Diff > HighValue then { HighValue = Diff; 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 Diff < LowValue then { LowValue = Diff; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } } CSarv = SAR_Value; } else { if Direction == 0 then { if Diff > Diff[1] then Direction = 1; else if Diff < Diff[1] then Direction = -1; } else { if Direction == 1 then { if Diff < Diff[1] then { Direction = -1; SAR_Value = HighValue; CSarv = SAR_Value; } } if Direction == -1 then { if Diff > Diff[1] then { Direction = 1; SAR_Value = LowValue; CSarv = SAR_Value; } } } LowValue = min(Diff, LowValue); HighValue = max(Diff, HighValue); } } plot1(diff,"(OI - oi1)"); plot2(CSARv,"diff파라볼릭"); //속성에서 점그래프 즐거운 하루되세요 > dkfvkrh7 님이 쓴 글입니다. > 제목 : 서식 부탁드립니다 > 안녕하세요 지표서식이 잘 적용되지 않아 부탁드리려고 합니다 아래와 같이 미결재약정을 현재수량 - 당일 첫봉의 마감수량의 당일 증감수량으로 미결재약정 파라볼릭 적용하려 하는데 미결재 잔량선이 파라볼릭 선을 상향돌파하거나 하향돌파하여도 파라볼릭선이 반대로 꺽어지지 않고 처음 향한 방향으로 호를 그리며 멀어져 갑니다 도움 부탁 드립니다 감사합니다 Input : AF(0.02), AFMAX(0.2),period(2); Input : p(0); var : OIV(0),oi1(0); OIV = Oi; var : Diff(0), mav(0); Diff = (OI - oi1) ; mav = ma(Diff,P); Var : Direction(0), SAR_Value(Diff), AF_Value(.02), HighValue(diff), LowValue(diff), EP(0),CSARV(0); if Diff == 0 Then Diff = Diff[1]; if EP != 0 Then { if Direction == 1 then { EP = HighValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if Diff > HighValue then { HighValue = Diff; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } if Diff < SAR_Value then { Direction = -1; SAR_Value = EP; AF_Value = 0; EP = 0; LowValue = Diff ; } } else { EP = LowValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if Diff < LowValue then { LowValue = Diff; AF_Value = AF_Value + Af; if AF_Value >= AFMAX then AF_Value = AFMAX; } if Diff > SAR_Value then { Direction = 1; SAR_Value = EP; AF_Value = 0; EP = 0; HighValue = Diff; } } 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 Diff > HighValue then { HighValue = Diff; 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 Diff < LowValue then { LowValue = Diff; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } } CSarv = SAR_Value; } else { if Direction == 0 then { if Diff > Diff[1] then Direction = 1; else if Diff < Diff[1] then Direction = -1; } else { if Direction == 1 then { if Diff < Diff[1] then { Direction = -1; SAR_Value = HighValue; CSarv = SAR_Value; } } if Direction == -1 then { if Diff > Diff[1] then { Direction = 1; SAR_Value = LowValue; CSarv = SAR_Value; } } } LowValue = min(Diff, LowValue); HighValue = max(Diff, HighValue); } } plot1(diff,"(OI - oi1)"); plot2(CSARv,"diff파라볼릭"); //속성에서 점그래프
프로필 이미지

예스스탁 예스스탁 답변

2019-10-22 08:50:35

안녕하세요 예스스탁입니다. OIV에 값을 저장해서 수식에서는 해당 값을 사용합니다. data2에 종가를 data1의 OI에 더한다면 OIV = data1(Oi)+data2(C); data2의 미결제약정을 더하시면 아래와 같이 변경하시면 됩니다. OIV = data1(Oi)+data2(OI); 나머지수식은 OIV로 계산하므로 별도로 수정할 부분이 없습니다, 다만 수식에서 참조데이타를 이용하면 각 변수가 이전봉 참조를 할때 어떤 데이타를 기준으로 한봉전 두봉전 값을 가져올지 지정해야 하고 사용하는 데이타가 어떤 데이타인지 모두 데이타번호 함수로 묶어주셔야 합니다. 모든 변수를 data1기준으로 선언해 드립니다. Input : AF(0.02), AFMAX(0.2),period(2); Input : p(0); var : OIV(0,data1),oi1(0,data1); var : Diff(0,data1), mav(0,data1); Var : Direction(0,data1), SAR_Value(Diff,data1), AF_Value(.02,data1); var : HighValue(diff,data1), LowValue(diff,data1), EP(0,data1),CSARV(0,data1); OIV = data1(Oi)+data2(OI); if data1(bdate != bdate[1] or index == 0) Then oi1 = oiv; Diff = OIV; mav = data1(ma(Diff,P)); if Diff == 0 Then Diff = Diff[1]; if EP != 0 Then { if Direction == 1 then { EP = HighValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if Diff > HighValue then { HighValue = Diff; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } if Diff < SAR_Value then { Direction = -1; SAR_Value = EP; AF_Value = 0; EP = 0; LowValue = Diff ; } } else { EP = LowValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if Diff < LowValue then { LowValue = Diff; AF_Value = AF_Value + Af; if AF_Value >= AFMAX then AF_Value = AFMAX; } if Diff > SAR_Value then { Direction = 1; SAR_Value = EP; AF_Value = 0; EP = 0; HighValue = Diff; } } 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 Diff > HighValue then { HighValue = Diff; 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 Diff < LowValue then { LowValue = Diff; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } } CSarv = SAR_Value; } else { if Direction == 0 then { if Diff > Diff[1] then Direction = 1; else if Diff < Diff[1] then Direction = -1; } else { if Direction == 1 then { if Diff < Diff[1] then { Direction = -1; SAR_Value = HighValue; CSarv = SAR_Value; } } if Direction == -1 then { if Diff > Diff[1] then { Direction = 1; SAR_Value = LowValue; CSarv = SAR_Value; } } } LowValue = min(Diff, LowValue); HighValue = max(Diff, HighValue); } } plot1(diff,"(OI - oi1)"); plot2(CSARv,"diff파라볼릭",iff(CSARv>CSARv[1],RED,blue)); //속성에서 점그래프 즐거운 하루되세요 > dkfvkrh7 님이 쓴 글입니다. > 제목 : Re : Re : Re : Re : 서식 부탁드립니다 > 번거롭게 해드려서 죄송합니다 한가지만 더 부탁 드리겠습니다 data2에 선물을 놓고 data1 + data2 의 두 값으로 파라볼릭 나타내려고 하는데 Diff = (OI - oi1) + (data2(c)) ;로 해서 실행하니까 안되는것 같습니다 data2의 첫봉값을 따로 저장해서 하는지 그럴경우 어떻게 하는지 부탁드립니다 감사합니다 > 예스스탁 님이 쓴 글입니다. > 제목 : Re : Re : Re : 서식 부탁드립니다 > 안녕하세요 예스스탁입니다. 1 차트의 최초봉에는 전봉이 없어 OI1이 저장되지 않아 첫봉에서도 값 저장되게 변경했습니다. diff파라볼릭을 상승시 빨강, 하락시 파랑으로 색상을 지정했습니다. 점그래프로 지정해서 보시면 됩니다. 위 내용을 제외하면 특별히 수정해 드릴부분이 보이지 않습니다. 2 diff가 첫봉에는 값이 0인데 아래 수식 내용이 있어서 첫봉의 값이 전일 마지막봉의 중가값으로 책정이 됩니다. 불필요한 내용이면 삭제하시기 바랍니다. if Diff == 0 Then Diff = Diff[1]; 3 Input : AF(0.02), AFMAX(0.2),period(2); Input : p(0); var : OIV(0),oi1(0); var : Diff(0), mav(0); Var : Direction(0), SAR_Value(Diff), AF_Value(.02), HighValue(diff), LowValue(diff), EP(0),CSARV(0); OIV = Oi; if bdate != bdate[1] or index == 0 Then oi1 = oiv; Diff = (OI - oi1) ; mav = ma(Diff,P); if Diff == 0 Then Diff = Diff[1]; if EP != 0 Then { if Direction == 1 then { EP = HighValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if Diff > HighValue then { HighValue = Diff; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } if Diff < SAR_Value then { Direction = -1; SAR_Value = EP; AF_Value = 0; EP = 0; LowValue = Diff ; } } else { EP = LowValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if Diff < LowValue then { LowValue = Diff; AF_Value = AF_Value + Af; if AF_Value >= AFMAX then AF_Value = AFMAX; } if Diff > SAR_Value then { Direction = 1; SAR_Value = EP; AF_Value = 0; EP = 0; HighValue = Diff; } } 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 Diff > HighValue then { HighValue = Diff; 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 Diff < LowValue then { LowValue = Diff; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } } CSarv = SAR_Value; } else { if Direction == 0 then { if Diff > Diff[1] then Direction = 1; else if Diff < Diff[1] then Direction = -1; } else { if Direction == 1 then { if Diff < Diff[1] then { Direction = -1; SAR_Value = HighValue; CSarv = SAR_Value; } } if Direction == -1 then { if Diff > Diff[1] then { Direction = 1; SAR_Value = LowValue; CSarv = SAR_Value; } } } LowValue = min(Diff, LowValue); HighValue = max(Diff, HighValue); } } plot1(diff,"(OI - oi1)"); plot2(CSARv,"diff파라볼릭",iff(CSARv>CSARv[1],RED,blue)); //속성에서 점그래프 즐거운 하루되세요 > dkfvkrh7 님이 쓴 글입니다. > 제목 : Re : Re : 서식 부탁드립니다 > 제가 뭘 잘못 적용하고 있을까요 새로 적용해보니 같은 현상이 나타납니다 선물지수 1분으로 하여 정규장으로 하였습니다 부탁드립니다 > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 서식 부탁드립니다 > 안녕하세요 예스스탁입니다. 수식에 첫봉의 미결제약정값이 없습니다. 변수만 oi1으로 선언이 되어 있고 값할당이 없습니다. Input : AF(0.02), AFMAX(0.2),period(2); Input : p(0); var : OIV(0),oi1(0); var : Diff(0), mav(0); Var : Direction(0), SAR_Value(Diff), AF_Value(.02), HighValue(diff), LowValue(diff), EP(0),CSARV(0); OIV = Oi; if bdate != bdate[1] Then oi1 = oiv; Diff = (OI - oi1) ; mav = ma(Diff,P); if Diff == 0 Then Diff = Diff[1]; if EP != 0 Then { if Direction == 1 then { EP = HighValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if Diff > HighValue then { HighValue = Diff; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } if Diff < SAR_Value then { Direction = -1; SAR_Value = EP; AF_Value = 0; EP = 0; LowValue = Diff ; } } else { EP = LowValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if Diff < LowValue then { LowValue = Diff; AF_Value = AF_Value + Af; if AF_Value >= AFMAX then AF_Value = AFMAX; } if Diff > SAR_Value then { Direction = 1; SAR_Value = EP; AF_Value = 0; EP = 0; HighValue = Diff; } } 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 Diff > HighValue then { HighValue = Diff; 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 Diff < LowValue then { LowValue = Diff; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } } CSarv = SAR_Value; } else { if Direction == 0 then { if Diff > Diff[1] then Direction = 1; else if Diff < Diff[1] then Direction = -1; } else { if Direction == 1 then { if Diff < Diff[1] then { Direction = -1; SAR_Value = HighValue; CSarv = SAR_Value; } } if Direction == -1 then { if Diff > Diff[1] then { Direction = 1; SAR_Value = LowValue; CSarv = SAR_Value; } } } LowValue = min(Diff, LowValue); HighValue = max(Diff, HighValue); } } plot1(diff,"(OI - oi1)"); plot2(CSARv,"diff파라볼릭"); //속성에서 점그래프 즐거운 하루되세요 > dkfvkrh7 님이 쓴 글입니다. > 제목 : 서식 부탁드립니다 > 안녕하세요 지표서식이 잘 적용되지 않아 부탁드리려고 합니다 아래와 같이 미결재약정을 현재수량 - 당일 첫봉의 마감수량의 당일 증감수량으로 미결재약정 파라볼릭 적용하려 하는데 미결재 잔량선이 파라볼릭 선을 상향돌파하거나 하향돌파하여도 파라볼릭선이 반대로 꺽어지지 않고 처음 향한 방향으로 호를 그리며 멀어져 갑니다 도움 부탁 드립니다 감사합니다 Input : AF(0.02), AFMAX(0.2),period(2); Input : p(0); var : OIV(0),oi1(0); OIV = Oi; var : Diff(0), mav(0); Diff = (OI - oi1) ; mav = ma(Diff,P); Var : Direction(0), SAR_Value(Diff), AF_Value(.02), HighValue(diff), LowValue(diff), EP(0),CSARV(0); if Diff == 0 Then Diff = Diff[1]; if EP != 0 Then { if Direction == 1 then { EP = HighValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if Diff > HighValue then { HighValue = Diff; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } if Diff < SAR_Value then { Direction = -1; SAR_Value = EP; AF_Value = 0; EP = 0; LowValue = Diff ; } } else { EP = LowValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if Diff < LowValue then { LowValue = Diff; AF_Value = AF_Value + Af; if AF_Value >= AFMAX then AF_Value = AFMAX; } if Diff > SAR_Value then { Direction = 1; SAR_Value = EP; AF_Value = 0; EP = 0; HighValue = Diff; } } 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 Diff > HighValue then { HighValue = Diff; 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 Diff < LowValue then { LowValue = Diff; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } } CSarv = SAR_Value; } else { if Direction == 0 then { if Diff > Diff[1] then Direction = 1; else if Diff < Diff[1] then Direction = -1; } else { if Direction == 1 then { if Diff < Diff[1] then { Direction = -1; SAR_Value = HighValue; CSarv = SAR_Value; } } if Direction == -1 then { if Diff > Diff[1] then { Direction = 1; SAR_Value = LowValue; CSarv = SAR_Value; } } } LowValue = min(Diff, LowValue); HighValue = max(Diff, HighValue); } } plot1(diff,"(OI - oi1)"); plot2(CSARv,"diff파라볼릭"); //속성에서 점그래프