Exitonclose dont work..
The logg writes:
2010-05-04 17:27:07 Order rejected - reason:Exchange is closed
Exchange is closing 17:27 and Session end time is 17:27.
Exitonclose rejected
The SetExitOnClose is working fine in historical simulations but its not ok if it close some times and some times not i real-world.
Is the solution to sell/buytocover, "next bar at market" at 17:26?
Or, to set Session end time to 17:26?
Even that Exchange is closing 17:27..
Or, have IB some funtion (that I havn't found) that end all active order when Exchange is closing?
To avoid gap/rate, there must be some feature that people often use when daytrade future.. Grateful for all suggestions.
Is the solution to sell/buytocover, "next bar at market" at 17:26?
Or, to set Session end time to 17:26?
Even that Exchange is closing 17:27..
Or, have IB some funtion (that I havn't found) that end all active order when Exchange is closing?
To avoid gap/rate, there must be some feature that people often use when daytrade future.. Grateful for all suggestions.
- TJ
- Posts: 7744
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
- TJ
- Posts: 7744
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
I would take the manual's suggestion and not want to use SetExitOnClose in live trading.
most broker/exchanges recommend you enter your last order at least 3 minutes before closing.
you can try something like this:
.
most broker/exchanges recommend you enter your last order at least 3 minutes before closing.
you can try something like this:
Code: Select all
input:
last.order.time(1723);
if time > last.order.time then
begin
sell...
buy to cover...
end;