EMA40:EMA(CLOSE,40),colorbrown;
EMA5:=EMA(CLOSE,5);
X2:=EMA5;
X3:=EMA40;
主升:=C>X2 AND C>X3;
主跌:=C<X3;
回调:=C<X2 AND C>X3;
反弹:=C>X2 AND C<X3;
STICKLINE(主升,CLOSE,O,2.8,0),COLOR000055;
STICKLINE(主升,CLOSE,O,2,0),COLOR000088;
STICKLINE(主升,CLOSE,O,1.5,0),COLOR0000AA;
STICKLINE(主升,CLOSE,O,1,0),COLOR0000CC;
STICKLINE(主升,CLOSE,O,0.5,0),COLOR0000EE;
STICKLINE(主升,H,L,0,0),COLOR0000EE;
STICKLINE(主跌,CLOSE,O,2.8,0),COLOR555500;
STICKLINE(主跌,CLOSE,O,2,0),COLOR888800;
STICKLINE(主跌,CLOSE,O,1.5,0),COLORAAAA00;
STICKLINE(主跌,CLOSE,O,1,0),COLORCCCC00;
STICKLINE(主跌,CLOSE,O,0.5,0),COLOREEEE00;
STICKLINE(主跌,H,L,0,0),COLOREEEE00;
STICKLINE(回调,O,C,2.8,0),COLORBB4400;
STICKLINE(回调,O,C,2,0),COLORCC5500;
STICKLINE(回调,O,C,1.5,0),COLORDD6600;
STICKLINE(回调,O,C,1,0),COLOREE7700;
STICKLINE(回调,O,C,0.5,0),COLORFF8800;
STICKLINE(回调,H,L,0,0),COLORFF8800;
STICKLINE(反弹,O,C,2.8,0),COLOR0077BB;
STICKLINE(反弹,O,C,2,0),COLOR0099CC;
STICKLINE(反弹,O,C,1.5,0),COLOR00bbdD;
STICKLINE(反弹,O,C,1,0),COLOR00ddeE;
STICKLINE(反弹,O,C,0.5,0),COLOR00FFFF;
STICKLINE(反弹,H,L,0,0),COLOR00FFFF;
DRAWTEXT_FIX(C>0,0,0,0,'【█】涨势'),COLOR0000AA;
DRAWTEXT_FIX(C>0,0,0.04,0,'【█】回调'),COLORDD6600;
DRAWTEXT_FIX(C>0,0,0.08,0,'【█】跌势'),COLORAAAA00;
DRAWTEXT_FIX(C>0,0,0.12,0,'【█】反弹'),COLOR00BBDD;