커뮤니티

강조식 하나 부탁합니다

프로필 이미지
나는전진만있을뿐
2019-11-25 15:19:45
148
글번호 133881
답변완료
var1 = ma(c,20); if MarketPosition >= 0 and dayindex > 0 and countif(C<O or (C==O and C <= C[1]),2) == 2 and countif(C<O,2) >= 1 and C < var1 위 식은 강조식으로 변형하면요 아래식으로 하는것이 맞는지 모르겠네요 틀리면 수정좀 부탁합니다 var : T(0),TL1(0),L1(0),TL2(0),H1(0); var1 = ma(C,20); if T <= 0 and dayindex > 0 and countif(C<O or (C==O and C <= C[1]),2) == 2 and countif(C<O,2) >= 1 and C < var1 Then { PlotPaintBar(H,L,"강조",GREEN); T = 1; L1 = l; TL1 = TL_New(sdate,stime,L1,sdate,stime,L1); TL_SetColor(TL1,RED); TL_SetStyle(TL1,3); } if T >= 0 and and dayindex > 0 and countif(C<O or (C==O and C <= C[1]),2) == 2 and countif(C<O,2) >= 1 and C > var1 Then { PlotPaintBar(H,L,"강조",BLACK); T = -1; H1 = H; TL2 = TL_New(sdate,stime,L1,sdate,stime,L1); TL_SetColor(TL2,BLUE); TL_SetStyle(TL2,3); } if T == 1 Then { if L < L1 Then L1 = L; TL_SetBegin(TL1,TL_GetBeginDate(TL1),TL_GetBeginTime(TL1),L1); TL_SetEnd(TL1,sdate,stime,L1); } if T == -1 Then { if H > H1 Then H1 = H; TL_SetBegin(TL2,TL_GetBeginDate(TL2),TL_GetBeginTime(TL2),H1); TL_SetEnd(TL2,sdate,stime,H1); }
강조
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2019-11-26 14:19:18

안녕하세요 예스스탁입니다. 해당 수식은 서로 반대되는 조건으로 지정해서 그 이후 최고가나 최저가를 계산하게 됩니다. and dayindex > 0 and countif(C<O or (C==O and C <= C[1]),2) == 2 and countif(C<O,2) >= 1 and C < var1 하지만 작성하신 식은 동일조건입니다. 검정 페인트바조건을 반대로 지정해 드립니다. var : T(0),TL1(0),L1(0),TL2(0),H1(0); var1 = ma(C,20); if T <= 0 and dayindex > 0 and countif(C<O or (C==O and C <= C[1]),2) == 2 and countif(C<O,2) >= 1 and C < var1 Then { PlotPaintBar(H,L,"강조",GREEN); T = 1; L1 = l; TL1 = TL_New(sdate,stime,L1,sdate,stime,L1); TL_SetColor(TL1,RED); TL_SetStyle(TL1,3); } if T >= 0 and dayindex > 0 and countif(C>O or (C==O and C > C[1]),2) == 2 and countif(C>O,2) >= 1 and C < var1 Then { PlotPaintBar(H,L,"강조",BLACK); T = -1; H1 = H; TL2 = TL_New(sdate,stime,L1,sdate,stime,L1); TL_SetColor(TL2,BLUE); TL_SetStyle(TL2,3); } if T == 1 Then { if L < L1 Then L1 = L; TL_SetBegin(TL1,TL_GetBeginDate(TL1),TL_GetBeginTime(TL1),L1); TL_SetEnd(TL1,sdate,stime,L1); } if T == -1 Then { if H > H1 Then H1 = H; TL_SetBegin(TL2,TL_GetBeginDate(TL2),TL_GetBeginTime(TL2),H1); TL_SetEnd(TL2,sdate,stime,H1); } 즐거운 하루되세요 > 나는전진만있을뿐 님이 쓴 글입니다. > 제목 : 강조식 하나 부탁합니다 > var1 = ma(c,20); if MarketPosition >= 0 and dayindex > 0 and countif(C<O or (C==O and C <= C[1]),2) == 2 and countif(C<O,2) >= 1 and C < var1 위 식은 강조식으로 변형하면요 아래식으로 하는것이 맞는지 모르겠네요 틀리면 수정좀 부탁합니다 var : T(0),TL1(0),L1(0),TL2(0),H1(0); var1 = ma(C,20); if T <= 0 and dayindex > 0 and countif(C<O or (C==O and C <= C[1]),2) == 2 and countif(C<O,2) >= 1 and C < var1 Then { PlotPaintBar(H,L,"강조",GREEN); T = 1; L1 = l; TL1 = TL_New(sdate,stime,L1,sdate,stime,L1); TL_SetColor(TL1,RED); TL_SetStyle(TL1,3); } if T >= 0 and and dayindex > 0 and countif(C<O or (C==O and C <= C[1]),2) == 2 and countif(C<O,2) >= 1 and C > var1 Then { PlotPaintBar(H,L,"강조",BLACK); T = -1; H1 = H; TL2 = TL_New(sdate,stime,L1,sdate,stime,L1); TL_SetColor(TL2,BLUE); TL_SetStyle(TL2,3); } if T == 1 Then { if L < L1 Then L1 = L; TL_SetBegin(TL1,TL_GetBeginDate(TL1),TL_GetBeginTime(TL1),L1); TL_SetEnd(TL1,sdate,stime,L1); } if T == -1 Then { if H > H1 Then H1 = H; TL_SetBegin(TL2,TL_GetBeginDate(TL2),TL_GetBeginTime(TL2),H1); TL_SetEnd(TL2,sdate,stime,H1); }