Recently I have created the following test:
- I had an order placed for which IB controller correctly reported TRUE when ibc.IsOrderPending(orderID) was called
- I have then disabled my WiFi which caused TWS to loose connection to IB servers.
- However, IB controller was still connected to TWS, which caused the call to ibc.IsConnected() to return TRUE
- I then called again ibc.IsOrderPending(orderID) for the same order, but this time the result was FALSE.
My questions are:
- Is there a way to detect when TWS is not connected to IB servers?
- When TWS is not connected to IB servers, what will ibc.PlaceOrder(…) return?