老师,
你好,日内平仓下午15点时可以用下面程序,
//日内平仓
IF TIME>=151000 THEN BEGIN
收盘平多:SELL(1,手数,MARKET);
收盘平空:SELLSHORT(1,手数,MARKET);
END
但是,有夜盘的品种在深夜收盘前平仓如何写?谢谢。
if (time0>timetot0(closetime(1))-5*60 and time<closetime(1)) or (time0>timetot0(closetime(0))-5*60 and time<closetime(0)) then begin
sell(1,0,marketr);
sellshort(1,0,marketr);
end