2024-08-09 11:28:36:167|3|4|Error in realtime market data handling: System.NullReferenceException: Object reference not set to an instance of an object.
at NinjaTrader.NinjaScript.StrategyBase.Process(Objec t sender, ExecutionEventArgs executionUpdate)
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
at NinjaTrader.Cbi.Account.RaiseExecutionUpdate(Execu tionEventArgs e)
at NinjaTrader.Cbi.Account.ExecutionUpdateCallback(In strument instrument, String executionId, Exchange exchange, DateTime time, MarketPosition marketPosition, String orderId, Int32 quantity, Double price, Double commission, Double fee, Boolean isSod, DateTime statementDate, Operation operation)
at NinjaTrader.Cbi.Simulator.Fill(Int32 maxFillQuantity, Double price)
at NinjaTrader.Cbi.Simulator.OnMarketData(Object sender, MarketDataEventArgs e)
at NinjaTrader.Cbi.Instrument.<>c__DisplayClass153_0. <OnRealtimeDataTimerElapsed>g__Action|1(Subscrib ed Thread[] threads, Int32 i, RealtimeEvents evts)
I have studied my OnExecutonUpdate quite hard and can't seem to find what object instance is missing - can anyone point me in the right direction?
I should add this happens sporadically - so 8/10 code runs fine.


Comment