if (time=closetime(0) and time0-timetot0(dynainfo(207))<=5) or not(islastbar) then begin
sell......;
sellshort.......;
end
if (time=closetime(0) and time0-timetot0(dynainfo(207))<=5) or not(islastbar) then begin
sell......;
sellshort.......;
end
if (time=closetime(0) and time0-timetot0(dynainfo(207))<=5) or (not(islastbar) and time=closetime(0)) then begin
sell......;
sellshort.......;
end
改一下,漏了一个条件,这下可以了