N:=9;
M1:=3;
M2:=19;
R:100*(CLOSE-REF(CLOSE,N))/REF(CLOSE,N);
RQ:MA(R,M1);
RQ1:MA(R,M2),COLORRED;
STICKLINE((R>RQ),RQ,R,2,0),COLORLIMAGENTA;
STICKLINE((R>RQ1),RQ1,R,2,0),COLOR0099FF;
STICKLINE((R< RQ),RQ,R,1,0),COLOR00FF00;
STICKLINE((R< RQ1),RQ1,R,1,0),COLOR00FF00;
A1:=(CROSS(R,RQ));
B1:=(CROSS(RQ,R));
A:=(CROSS(R,RQ)) AND (CROSS(R,RQ1));
B:=(CROSS(RQ,R)) AND (CROSS(RQ1,R));
DRAWTEXT(A1,RQ,'★买'),COLOR0000FF;
DRAWTEXT(A,RQ1,'加仓')COLORYELLOW;
DRAWTEXT(B1,RQ,'↓逃'),COLORLIMAGENTA;
DRAWTEXT(B,RQ1,'清仓'),COLOR00FF00;
0,DOTLINE,COLORGRAY;
DRAWTEXT_FIX(1,0.75,0.04,0,'所属行业:')COLORFF00FF;
DRAWTEXT_FIX(1,0.82,0.04,0,HYBLOCK)COLORFF00FF;
DRAWTEXT_FIX(1,0.88,0.04,0,'代码:')COLORWHITE;
DRAWTEXT_FIX(1,0.92,0.04,0,CODE)COLORWHITE;