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;
XG:REF(XG9,1)<>1 AND XG9=1;