Correct. You set OutsideRth to true on every order object in the bracket. But at least on STOP orders. Order presets defined within TWS have no impact on your TWS API client.
As a matter of practice, we set OutsideRth true on all orders in the bracket for ES trades, but apparently only the StopLoss STOP order really needs it set for triggers to work. In fact we get Error 2109 warnings on all other orders: 'Outside Regular Trading Hours' is ignored based on the order type and destination. PlaceOrder is now being processed.
In the example below OutsideRth was set to true for all four orders in the bracket
- 222 MKT entry order
- 222.1 LMT profit taker order
- 222.2 STOP stop loss order
- 222.3 MKT position close order with time condition at 15:55 Central time
Placing orders 222, 222.1, and 222.3 triggers (error) warning 2109, but placing 222.2 does not and it will not trigger outside of the regular trading hours without OutsideRth? set to true.
闯ü谤驳别苍
toggle quoted message
Show quoted text
On Thu, Jun 23, 2022 at 04:42 PM, Jenzi wrote:
That's a very interesting thought, because the exits were made in the second the us markets did open.
Otherwise, i have made many other trades during the day where it worked (same instrument, exits on taget limit or stop).
In the TWS 'Global Configuration' - 'Presets' for Futures the checkmark is set.
You mean to set the option for every bracket order when creating/sending an order? I'll give that a try.
bool? |
[get, set] |
? |
If set to true, allows orders to also trigger or fill outside of regular trading hours. |