if c>hhv(h,3) then begin sellshort(holding<0,holding,market); buy(holding=0,1,market); end if c<llv(l,3) then begin sell(holding>0,holding,market); buyshort(holding=0,1,market); end if enterbars>=3 then begin sellshort(holding<0,holding,market); sell(holding>0,holding,market); end
3楼
zhou1980 发表于:2014/12/2 9:55:28
如果此时满足1或者2的条件就不平仓。
这个条件还没有实现
4楼
yukizzc 发表于:2014/12/2 10:03:59
条件1:=c>hhv(h,3) ;
条件2:=c<llv(l,3);
if enterbars>=3 and not(条件1 or 条件2) then begin sellshort(holding<0,holding,market); sell(holding>0,holding,market); end