ma10:ma(c,10); ma60:ma(c,60); jc:cross(ma10,c); qp:cross(ma60,c); //平空开多 if c>ma10 and c>ma60 then begin sellshort(holding<0,holding,market); buy(holding=0,4,market); end //减仓 if jc then sell(holding>0,2,market); //平多开空 if qp then begin sell(holding>0,holding,market); if c<ma10 and c<ma60 and holding=0 then buyshort(1,1,market); end