请问:收盘前5分钟平掉所有仓位,如何写?
2,如何实现离开盘价30个点止盈,止损(用在沪深300期货上)?
1.
if time>=151000 then begin
sell(1,0,market);
sellshort(1,0,market);
end
2.
以开多为例,开空请根据下面编写的自行修改
30点止盈:
if holding>0 and h-enterprice>30*mindiff then sell(1,0,market);
if holding>0 and enterprice-l>30*mindiff then sell(1,0,market);