开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

TWS API Error 2019: Order Event Warning - got when trying to submit Bracket order for execution outside RTH. Entry, profit OK. Stop NG.


 

Hi All,

I tried searching twsapi group for this and didn't find a hit.? Hope I didn't miss anything.

I'm trying to submit a Backet order,(in this case, for SQ) to fill outside of regular trading hours.? It successfully submits EXCEPT for this warning on the StopLoss:
"Error: 2109 Order Event Warning:Attribute 'Outside Regular Trading Hours' is ignored based on the order type and destination. PlaceOrder is now being processed."

I've been using bracket orders thru the API for a lot of years, so I don't think it's my code.
Set Extended Attributes Range("D72") = 1 - works for Entry and profit.? IB TWS chokes on StopLoss, but "successfully" submits the order.

Win7
TWS Build 963.3g May 30, 2017
API_Version=9.71 (.idl and.ocx strangely dated 2013)
ActiveX/Excel

Any help truly appreciated,
Thanks Again,
Lou Dudka


Nick
 

When I have encountered this it was due to the rthOnly setting (or whatever it is called now). If you reverse the rthOnly setting for the stop order the warning will probably go away.

I never figured out the actual rules but when I got error 2109 I noted the symbol, order type and exchange. Within my order placement routine I added a check for these combinations and forced rthOnly to be whatever didn't cause the error.

Not? helpful in explaining the root cause I know, but it let order processing happen without warnings.

On 8/31/2018 11:46 AM, loududka@... wrote:
I'm trying to submit a Backet order,(in this case, for SQ) to fill outside of regular trading hours.? It successfully submits EXCEPT for this warning on the StopLoss:
"Error: 2109 Order Event Warning:Attribute 'Outside Regular Trading Hours' is ignored based on the order type and destination. PlaceOrder is now being processed."


 

The message
"Error: 2109 Order Event Warning:Attribute 'Outside Regular Trading Hours' is ignored based on the order type and destination.
is actually just a warning to let you know that for the designated order type and exchange there is no distinction between rth and 'outside rth'. It will not prevent an order from being placed. For stocks, this is because regular stop orders don't trigger outside of the regular trading hours period 9:30-4:00. This is to protect traders, as the extended trading hours can be very illiquid and the usual NBBO rules don't apply. You can however place a stop limit order which would be active outside of rth (though theres a reasonable chance of a very bad fill with this combination).

Josh (IBKR)