DIF60:=EMA(CLOSE,12/2)-EMA(CLOSE,26/2);
DEA60:=EMA(DIF60,9/2);
RSV60:=(CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36));
K60:=SMA(RSV60,3,1);
D60:=SMA(K60,3,1);
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;
RSV:=(CLOSE-LLV(LOW,12))/(HHV(HIGH,12)-LLV(LOW,12));
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
周K:=MA("kdj.K#WEEK"(9,3,3) ,5);
周D:=MA("kdJ.D#WEEK"(9,3,3) ,5);
周J:=MA("KDJ.J#WEEK"(9,3,3) ,5);
月K:="KDJ.K#MONTH" ;
月D:="KDJ.D#MONTH" ;
XH1:=IF(DIF60>=DEA60,1,0);
XH2:=IF(K60>= D60,1,0);
XH3:=IF(DIF>=DEA,1,0);
XH4:=IF(周MD>=周MA,1,0);
XH5:=IF(月MD>=月MA,1,0);
XH6:=IF(K>=D,1,0);
XH7:=IF(周K>=REF(周K,1),1,0);
XH8:=IF(周J>=REF(周J,1),1,0);
XH9:=IF(月K>=月D,1,0);
XH15:=IF(周K>=周D,1,0);
XHHJ1:=XH2+XH6+XH9+XH15;
XHHJ2:=XH3+XH4+XH5+XH1;
红加号:crOSS(XHHJ1,3) OR CROSS(XHHJ2,3);