-- 作者:pyd
-- 发布时间:2014/8/26 13:40:15
--
按图上描述条件写的供参考,手数和价格自己修改下
if c=g-2 or c=d-2 then begin sell(holding>0,1,market); buyshort(holding=0,1,market); end if c=g+2 then begin sellshort(holding<0,1,market); buy(holding=0,1,limit,g+2); end if c=d-2 then begin sell(holding>0,1,market); buyshort(holding=0,1,market); end if c<d-2 or h-enterprice>=20 then sell(holding>0,holding,market); if c>g+2 or enterprice-l>=20 then sellshort(holding<0,holding,market);
|