操盘线图示
操盘线源代码如下:
{主代码}
N1:=18;N2:=50;N3:=32;
CPX:(MA(CLOSE,8)*N1/100+MA(CLOSE,30)*N2/100+MA(CLOSE,60)*N3/100)COLORWHITE;
NOTEXTWS:CPX>REF(CPX,1) AND MA(CLOSE,30)>REF(MA(CLOSE,30),1) AND CLOSE>CPX AND CLOSE>MA(CLOSE,30),NODRAW;
NOTEXTWX:CPX<=REF(CPX,1) AND MA(CLOSE,30)<=REF(MA(CLOSE,30),1) AND CLOSE
NOTEXT1:IF(NOTEXTWS=1,CPX,DRAWNULL),COLORRED;
NOTEXT2:IF(NOTEXTWX=1,CPX,DRAWNULL),COLORFFFF00;
{辅助代码}
DRAWKLINE(H,O,L,C);
DRAWTEXT(CURRBARSCOUNT=5,H,'5');DRAWTEXT(CURRBARSCOUNT=8,H,'8');
DRAWTEXT(CURRBARSCOUNT=13,H,'13');DRAWTEXT(CURRBARSCOUNT=21,H,'21');DRAWTEXT(CURRBARSCOUNT=34,H,'34');
DRAWTEXT(CURRBARSCOUNT=55,H,'55');DRAWTEXT(CURRBARSCOUNT=89,H,'89');DRAWTEXT(CURRBARSCOUNT=144,H,'144');
DRAWICON(NOTEXTWS=1 AND NOT(REF(NOTEXTWS,1)) AND COUNT(NOTEXTWS=1,BARSLAST(NOTEXTWX=1))=1,CPX,38);
DRAWICON(NOTEXTWX=1 AND NOT(REF(NOTEXTWX,1)) AND COUNT(NOTEXTWX=1,BARSLAST(NOTEXTWS=1))=1,CPX,39);
DRAWLINE(CURRBARSCOUNT=144,L,CURRBARSCOUNT=1,H,0),DOTLINE,COLOR00FFFF;
DRAWLINE(CURRBARSCOUNT=89,L,CURRBARSCOUNT=1,H,0),COLORFFFFFF;