以下是阴阳波浪画线

{波浪比较阴阳波浪画线}
C1:=C>O;
 C2:=C=O AND REF(C1,1) AND L<REF(H,1);
 C3:=C<O;
 C4:=C=O AND REF(C3,1) AND H>REF(L,1);
 M1:=IF((C1 AND (REFX(C3,1) OR REFX(C=O AND L<REF(H,1),1))) OR C4,H,
 IF((C3 AND (REFX(C1,1) OR REFX(C=O AND H>REF(L,1),1))) OR C2,L,DRAWNULL));
 M2:=IF(ISLASTBAR,IF(C1,H,IF(C3,L,IF(C=O AND REF(M1,1)=L,H,L))),M1);
 M3:PLOYLINE(1,M2);
 STICKLINE(C=O,H,L,1,0),COLORYELLOW;
 CH:=M3>REF(M3,1) AND M3>REFX(M3,1);
 CL:=M3<REF(M3,1) AND M3<REFX(M3,1);
 HH:IF(CH,H,0),NODRAW;
 LL:IF(CL,L,0),NODRAW;
 T12:=SUMBARS(CH,2)-1,NODRAW;
 T22:=SUMBARS(CL,2)-1,NODRAW;
 HG:=HH>REF(HH,T12) AND HH,NODRAW;
 HD:=HH<=REF(HH,T12) AND HH,NODRAW;
 LG:=LL>REF(LL,T22) AND LL;
 LD:=LL<=REF(LL,T22) AND LL;
 NH1:=IF(HD,1,COUNT(HG,BARSLAST(HD)+1)+1),NODRAW;
 NH2:=IF(NH1<>REF(NH1,1),NH1,IF(HD,1,0)),NODRAW;
 DRAWNUMBER(CH,H*1.05,NH2),COLORRED;
 NL1:=IF(LG,1,COUNT(LD,BARSLAST(LG)+1)+1),NODRAW;
 NL2:=IF(NL1<>REF(NL1,1),NL1,IF(LG,1,0)),NODRAW;
 DRAWNUMBER(CL,L*0.95,NL2),COLORGREEN;
 N3:=IF(ISLASTBAR AND C>=O,REF(NH2,BARSLAST(NH2)),
 IF(ISLASTBAR AND C<O,REF(NL2,BARSLAST(NL2)),DRAWNULL));
 DRAWNUMBER(ISLASTBAR,H*1.01,N3),COLORYELLOW;
 STICKLINE(V>MA(V,10)*2,C,O,1,0),COLORYELLOW;
 STICKLINE(V<MA(V,10)/2,C,O,1,0),COLORMAGENTA;
 SUM100:SUM(NH2+NL2,100),NODRAW;
 SUM20:SUM(NH2+NL2,20),NODRAW;
 SUM10:SUM(NH2+NL2,10),NODRAW;

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。