--
DIFF :=EMA(c,S) - EMA(c,P);
DEA :=EMA(DIFF,M);
MACD :=2*(DIFF-DEA);
ee:DYNAINFO( 62);
手数:=ss;
//交易条件
aa:=cross(dea,0);//开多平空条件
bb:=cross(0,dea);//开空平多条件
//交易系统
平空:SELLSHORT(aa and holding<0,0,THISCLOSE);
平多:SELL(bb and holding>0,1,THISCLOSE);
开多:BUY(aa and holding=0,1,THISCLOSE);
开空:BUYSHORT(bb and holding=0,0,THISCLOSE);