커뮤니티

수식 문의

프로필 이미지
흑수돌
2022-01-10 10:36:48
1211
글번호 155277
답변완료
안녕하세요. 주말 잘 보내셨는지요. 일전에 도움 주신 아래의 수식을 data2에도 적용할 수 있도록 수정하고 싶습니다. 항상 친절한 답변 감사드립니다. input : X(1),X1(1); var : diff(0),color(0); diff = Upvol-DownVol; if Bdate != Bdate[1] Then { Condition1 = False; if diff > 0 Then { Condition1 = true; color = rgb(242,150,97); } Else { Condition1 = true; color = Rgb(103,153,255); } } else { if diff < 0 and diff[1] > 0 and abs(diff) >= abs(diff[1]+(diff[2]*X1))*X Then { Condition1 = true; color = rgb(103,153,255); } if diff > 0 and diff[1] < 0 and abs(diff) >= abs(diff[1]+(diff[2]*X1))*X Then { Condition1 = true; color = Rgb(242,150,97); } } if Condition1 == true Then PlotPaintBar(H,L,"강조",color);
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2022-01-10 17:54:55

안녕하세요 예스스탁입니다. 강조식은 data2위에 적용이 되지 않습니다. data2조건으로 data1봉에 표시되기를 원하시면 아래와 같이 수정하시면 됩니다. input : X(1),X1(1); var : diff(0,Data2),color(0),cond(False); diff = data2(Upvol-DownVol); if Bdate != Bdate[1] Then { Cond = False; if diff > 0 Then { Cond = true; color = rgb(242,150,97); } Else { Cond = true; color = Rgb(103,153,255); } } else { if diff < 0 and diff[1] > 0 and abs(diff) >= abs(diff[1]+(diff[2]*X1))*X Then { Cond = true; color = rgb(103,153,255); } if diff > 0 and diff[1] < 0 and abs(diff) >= abs(diff[1]+(diff[2]*X1))*X Then { Cond = true; color = Rgb(242,150,97); } } if Cond == true Then PlotPaintBar(H,L,"강조",color); 즐거운 하루되세요 > 흑수돌 님이 쓴 글입니다. > 제목 : 수식 문의 > 안녕하세요. 주말 잘 보내셨는지요. 일전에 도움 주신 아래의 수식을 data2에도 적용할 수 있도록 수정하고 싶습니다. 항상 친절한 답변 감사드립니다. input : X(1),X1(1); var : diff(0),color(0); diff = Upvol-DownVol; if Bdate != Bdate[1] Then { Condition1 = False; if diff > 0 Then { Condition1 = true; color = rgb(242,150,97); } Else { Condition1 = true; color = Rgb(103,153,255); } } else { if diff < 0 and diff[1] > 0 and abs(diff) >= abs(diff[1]+(diff[2]*X1))*X Then { Condition1 = true; color = rgb(103,153,255); } if diff > 0 and diff[1] < 0 and abs(diff) >= abs(diff[1]+(diff[2]*X1))*X Then { Condition1 = true; color = Rgb(242,150,97); } } if Condition1 == true Then PlotPaintBar(H,L,"강조",color);