白银是白天晚上都交易的,我想做日内的模型评测,开盘就交易,收盘前一分钟平仓,夜盘也是这样。请问老师这时间代码该怎么写?
还有就是Thisclose函数,在图表交易中是不是相当于买1价排队买,卖1价排队卖?它解释说是按最优价格成交。
另外我看到老师都爱写if then begin,我比较习惯直接用开多条件:AA;开空条件:BB。。。。这样,两者是否都完全一样呢?还是前面那种执行得比较快?
1.收盘前平仓
白银收盘时间是3个
晚上:6:30
上午:15:30
下午:19:00
收盘前平仓代码可以这么写
if time>062500 and time<=063000 or (time>152500 and time<=153000) or (time>185500 and time<=190000) then begin
sell(1,0,market);
sellshort(1,0,market);
end
2.
thisclose实盘下单按照对手价报单
3.用if 更具有灵活性,直接写条件不易写复杂策略
1.收盘前平仓
白银收盘时间是3个
晚上:6:30
上午:15:30
下午:19:00
收盘前平仓代码可以这么写
if time>062500 and time<=063000 or (time>152500 and time<=153000) or (time>185500 and time<=190000) then begin
sell(1,0,market);
sellshort(1,0,market);
end
2.
thisclose实盘下单按照对手价报单
3.用if 更具有灵活性,直接写条件不易写复杂策略