X_1:=REF(CLOSE,1);
X_2:=SMA(MAX(CLOSE-X_1,0),6,1)/SMA(ABS(CLOSE-X_1),6,1)*100;
X_3:=(2*CLOSE+HIGH+LOW)/4;
X_4:=LLV(LOW,34);
X_5:=HHV(HIGH,34);
Y:EMA((X_3-X_4)/(X_5-X_4)*100,13),COLORRED;
D:EMA(0.667*REF(Y,1)+0.333*Y,2),COLORYELLOW;
X_6:=CROSS(Y,D);
STICKLINE(D<Y,Y,D,2,0),COLORRED;
DRAWICON(CROSS(Y,D),Y,23);
买:CROSS(Y,D),NODRAW,COLORRED;
DRAWTEXT(买>0,D*1.1,'买'),COLORRED;
卖:CROSS(D,Y),NODRAW,COLORGREEN;
GOODGUPIAO:SMA(MAX(CLOSE-C,0),7,1)/SMA(ABS(CLOSE-C),7,1)*100,NODRAW;
DRAWTEXT(卖>0,Y*1.1,'卖'),COLORGREEN;
逃:CROSS(80,X_2),NODRAW,COLORYELLOW;
DRAWTEXT(CROSS(80,X_2),Y*1,'逃'),COLORYELLOW;
短线:Y<50 AND D<50,NODRAW,COLORMAGENTA;
中线:Y>=50 AND D>=50 AND Y<80 AND D<80,NODRAW,COLORLIRED;
长线:Y>=80 AND D>=80 AND Y<110 AND D<110,NODRAW,COLORRED;
50,COLORGRAY;
100,COLORGRAY;