图表交易,1分钟周期,想在实盘前30秒平掉所有的仓位,商品和股指都需要,怎么写
t1:=timetot0(dynainfo(207));
t2:=timetot0(closetime(0));
tt:=t2-t1;
if (islastbar and t2-t1<=30) or (not(islastbar) and time=closetime(0)) then begin
sellshort(1,0,market);
sell(1,0,market);
end
这个商品股指通用
not(islastbar) and time=closetime(0)
time=closetime(0) 是什么意思,它会跟not(islastbar) 同时满足条件吗