What might cause this to happen in realtime sim and not in playback?
A search of the NinjaScript help suggests using OnOrderUpdate for assigning StopLoss orders:
" // Assign stopLossOrder in OnOrderUpdate() to ensure the assignment occurs when expected.
// This is more reliable than assigning Order objects in OnBarUpdate,
// as the assignment is not guaranteed to be complete if it is referenced immediately after submitting"
https://ninjatrader.com/support/helpGuides/nt8/NT%20HelpGuide%20English.html?realtimeerrorhandlin g.htm

Comment