麻烦一下老师,我想设置在9:00-9:30和21:00-21:30这两个交易时间段提前250秒平仓,该怎么表达?
If c<enterprice-5 and holding>0 then sell(1,0,marketr);
If c>enterprice+5 and holding<0 then sellshort(1,0,marketr);
tq:=Not(islastbar) or (timetot0(dynainfo(207))>=time0-250);
If c<enterprice-5 and holding>0 and tq and ((time>090000 and time<=093000) or (time>210000 and time<=213000)) then sell(1,0,marketr);
If c>enterprice+5 and holding<0 and tq and ((time>090000 and time<=093000) or (time>210000 and time<=213000)) then sellshort(1,0,marketr);
说明满足你的条件了