SHORT:=12;
LONG:=26;
M:=9;
N1:=7;
N2:=14;
M1:=75;
M2:=25;
gspt1:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
gspt2:=EMA(gspt1,M);
gspt8:=CROSS(gspt1,gspt2);
gspt9:=CROSS(gspt2,gspt1);
LC:=REF(CLOSE,1);
gsptE1:=MEMA(MAX(CLOSE-LC,0),N1)/MEMA(ABS(CLOSE-LC),N1)*100;
gsptE2:=MEMA(MAX(CLOSE-LC,0),N2)/MEMA(ABS(CLOSE-LC),N2)*100;
STICKLINE(gspt1>gspt2,CLOSE,OPEN,3,0),COLORRED;
STICKLINE(gspt1>gspt2,HIGH,LOW,0,0),COLORRED;
STICKLINE(gspt1<=gspt2,HIGH,LOW,0,1),COLORGREEN;
STICKLINE(gspt1<=gspt2,CLOSE,OPEN,3,1),COLORGREEN;
MA3:EMA(CLOSE,3),COLORWHITE,LINETHICK2;
MA26:EMA(CLOSE,26),COLORYELLOW,LINETHICK2;
DRAWTEXT(gspt8,LOW,'买'),COLORWHITE;
DRAWTEXT(gspt9,HIGH,'卖'),COLORYELLOW;