How to get the status of current orders after restarting?

How do you get the status of your orders if you lose connectivity or restart your trading app? I tried calling InquireAll after calling Start on the newly created TradeSubscription object, but the OrderUpdated event was never fired.

1 Reply

The second boolean in the InstrumentTradeSubscription constructor is "ownOrdersOnly" meaning that if it is set to true the trade subscription can only see orders that that trade subscription has placed. Set that to false and it will be able to see all orders on that instrument.Also, working orders from previous runs of the application will initially show up in OrderAdded events (and updates made since the subscription started will come in as OrderUpdated) so subscribe to that too to see the preexisting orders come in.

This seems to be exactly what I needed to know, but even after setting the ownOrdersOnly flag to false, it's still not working. After making the change, placing an order away from the market, and restarting the app, the event handler functions for OrderAdded and OrderUpdated are not called. Any ideas?