if 开空条件 and holding=0 then 开空;//常规开单
if 开空条件 and holding<0 and openprofit<30*mindiff*mulpiter then 开空;//浮盈30个点之内再次开单
开多同理
可能是我没表述清楚。
如果上次开仓后,浮盈超过30个点,平仓了结后,holding=0的情况下,就不再开仓了。是这样的意思
是否可以这样编写为:
if openprofit<30*mindiff*mulpiter then kg:=1;
开空条件 and holding=0 and kg=1 then 开空;//常规开单
开多条件 and holding=0 and kg=1 then 开多;//常规开单
闭市前,在将kg变量清零。
谢谢。