DIF60:=EMA(CLOSE,12/4)-EMA(CLOSE,26/4);

DEA60:=EMA(DIF60,9/2);

DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);

DEA:=EMA(DIF,9);

周MD:=MACD.DIF#WEEK;

周MA:=MACD.DEA#WEEK;

月MD:=MACD.DIF#MONTH;

月MA:=MACD.DEA#MONTH;

RSV60:=(CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36));

K60:=SMA(RSV60,3,1);

D60:=SMA(K60,3,1);

RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9));

K:=SMA(RSV,3,1);

D:=SMA(K,3,1);

J:=3*K-2*D;

周K:="KDJ.K#WEEK" ;

周D:="KDJ.D#WEEK" ;

月K:="KDJ.K#MONTH" ;

月D:="KDJ.D#MONTH" ;

XG1:=DIF60>=DEA60;

XG2:=DIF>=DEA;

XG3:=周MD>=周MA;

XG4:=月MD>=月MA;

XG5:=K60>= D60;

XG6:=K>=D;

XG7:=周K>=周D;

XG8:=月K>=月D;

XG9:=XG1 AND XG2 AND XG3 AND XG4 AND XG5 AND XG6 AND XG7 AND XG8;

XGE:=XG1 + XG2 + XG3 + XG4 + XG5 + XG6 + XG7 + XG8;

{DRAWNUMBER(XGE=8 AND TIME<=0935,52,XGE),COLORMAGENTA;}

XG:REF(XG9,1)<>1 AND XG9=1,NODRAW;

STICKLINE(XG AND TIME<=0935,0,46,5,0),COLORMAGENTA;