If time >= 0845 and time <= 1300 and marketposition = 0 then begin
If close cross over value1 then buy next bar at open;
If close cross under value1 then sellshort next bar at open;
end;
If time >= 0845 and time <= 1300 and marketposition = 0 then begin
If close cross over value1 then
if First_Cross then First_Cross = False
else buy next bar at open;
If close cross under value1 then
if First_Cross then First_Cross = False
else sellshort next bar at open;
end;