SHORT:=12;
LONG:=26;
MID:=9;
DIF:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:=EMA(DIF,MID);
BUYIF:=CROSS(DIF,DEA);
SELIF:=CROSS(DEA,DIF);
BTRADE:=IF(BUYIF,C-0.01,C+0.01);
STRADE:=IF(SELIF,C+0.01,C-0.01);
BUYIN:TRADETO(0,BTRADE);
SELLOUT:TRADETO(1,STRADE);测试通不过 |