想在上午收盘时平仓 可以用这个办法吗?
if currenttime>115957 then
begin
tsell(1,0,mkt);
end
if currenttime>115957 then
begin
tsellshort(1,0,mkt);
end
国内期货的收盘时间是11:30
上午收盘前2分钟平仓--图表,把命令改成对应的后台即可
if currenttime > 112800 and currenttime <= 113000 then
begin
sell(holding > 0, 0, thisclose);
sellshort(holding < 0, 0, thisclose);
end
犯了一个低级错误 把时间搞错了