模型中加入收盘最后5分钟不开仓,接近收盘1分钟清仓,(包括中午收盘)
还是使用time函数
cond:not((time>=152500 and time<=153000) or (time>=185500 and time<=190000));//把这个加入到开仓条件里面去
cond2:(time>=1529000 and time<=153000) or (time>=185900 and time<=190000);
if cond2 then
begin
sell(holding>0,holding,market);
sellshort(holding<0,holding,market);
end
此类需求的实现都是配合time函数来实现的