DIF:=EMA(CLOSE,12)-EMA(CLOSE,26),COLORRED;
LC:=REF(CLOSE,1);
rsi5:=((SMA(MAX((CLOSE-LC),0),5,1)/SMA(Abs((CLOSE-LC)),5,1))*100);
DEA:=EMA(DIF,9),COLORBLUE;
TR1:=SUM(MAX(MAX((HIGH-LOW),ABS((HIGH-REF(CLOSE,
1)))),ABS((LOW-REF(CLOSE,1)))),10);
HD:=(HIGH-REF(HIGH,1));
FH1:=REF(macd,1)<REF(MacD,2) AND REF(MACD,
2)<REF(MACD,3) AND REF(MACD,3)<REF(MACD,4);
FH2:=MACD>=0 AND COUNT(MACD>REF(MACD,1),1)=1;
LD:=(REF(LOW,1)-LOW);
DMP:=SUM(IF(((HD>0) AND (HD>LD)),HD,0),10);
DMM:=SUM(IF(((LD>0) AND (LD>HD)),LD,0),10);
FH3:=FH1 AND FH2 AND EMA(C,13)>REF(EMA(C,13),1);
FH4:=FH1 AND FH2 AND ABS((DIF-DEA)/C)<0.018;
FH5:=FH1 AND FH2 AND MACD<0.10;
pdi:=((DMP*100)/TR1);
mdi:=((DMM*100)/TR1);
ADX:=MA(((ABS((MDI-PDI))/(MDI+PDI))*100),5);
AV:=(RSI5+ADX);
wr10:=((100*(HHV(HIGH,10)-CLOSE))/(HHV(HIGH,10)-LLV(LOW,10)));
NEWvol:=(RSI5-WR10);
最佳买入:=(AV+NEWVOL);
买入选股:=IF(crOSS(最佳买入,0),3,0),COLOR00FFFF,LINETHICK2;
VARA1:=SMA(买入选股,3,1);
VARA2:=SMA(VARA1,3,1),COLOR0000FF;
VARA3:=SMA(VARA2,3,1),COLOR00FFFF;
建仓买点:IF(CROSS(VARA2,VARA3) AND (VARA2<40),3,0* 10000),COLOR0000FF,LINETHICK1;