In realtime/live, and I can find the stop loss order by id or name "stop loss."
But in strategy analyzer, my stop loss update method always says it cannot find the current stop loss order.
Example: "Warning: Unable to find current stop loss order. OrderId: NT-00001-2182"
Also when I try Print($"Total Orders: {Orders.Count}"); it just shows there are 0 orders even though the strategy should still have a stop loss order open. I'm not sure what is going on. As a result, my strategy has one position open until it's forced closed by the market closing.
How can I manage/update my stop loss order in a way that will be compatible with strategy analyzer?
Do I need to manage an order object locally? Looks like docs say so, but I had not noticed so far since it worked great on sim/live trading. "It is critical to assign an Order object to keep track of your order or else you will not be able to identify it in your code later since there is no signal tracking when using Unmanaged order methods. Please be aware of the following information about Order objects:"

Comment