Is there a way to obtain a list (collection) of all existing unmanaged orders upon startup of a strategy?
This capability would aid in disaster recovery (i.e. NT8 "hangs" and must be restarted -- which has happened more than once). And it would also allow one strategy to "see" and potentially access a collection of orders submitted by a different strategy.
A user case example:
- My strategy NinjaScript submits an unmanaged entry order, and OCO bracket stop / target orders -- 3 unmanaged orders in all.
- I disable the strategy (turn it off). The orders remain active, of course.
- I enable the strategy again, or enable a different strategy.
- The strategy is able to obtain a list of order objects for the unmanaged orders that already exist at the time of strategy startup.
Based on my testing, I have observed the following after restarting the strategy:
- Account.Orders does not return any of the existing orders that were submitted unmanaged.
- Also, OnOrderUpdate() is not triggered for changes to any pre-existing orders after the strategy is restarted.
- From the perspective of the restarted strategy, it is as if the previously issued unmanaged orders no longer exist. Yet there they are on the NT chart.
Surely somewhere inside NT8 there is a collection of the unmanaged order objects that can be accessed by the strategy. However, I have not come across it in documentation.
Thanks in advance for your assistance.
Comment