Correct me if I'm wrong but if an order object (entryLong for example) is OrderState.Filled in State.Historical, using
GetRealtimeOrder(entryLong)
I realized this very belatedly, and ended up coding a bunch of stuff that relies on
if (entryLong != null)
This worked wonderfully during backtest and on historical charts, but ran into obvious issues during live trading.
Is there a way to force GetRealtimeOrder(entryLong) to not return a null value for OrderState.Filled? Or does anyone have some thoughts on how to workaround this?
Last resort is to change all code that relies on "if (entryLong != null)", a prospect that I'm not relishing as its quite a bit!
Thanks in advance.

Comment