I am getting unhandled exception when attempting to call CloseStrategy()
It is not in my code, it happens right after OnExecutionUpdate()
How do I diagnose the problem?
2020-11-25 18:21:39:572 *************** unhandled exception trapped ***************
2020-11-25 18:21:39:572 Exception has been thrown by the target of an invocation.
2020-11-25 18:21:39:572 Object reference not set to an instance of an object.
2020-11-25 18:21:39:601 System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> 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.Simulator.<>c__DisplayClass21_0.<O nTimerSubmitNow>b__0(MarketDataEventArgs e)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeIn ternal(Object obj, Object[] parameters, Object[] arguments)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Windows.Threading.ExceptionWrapper.Internal RealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatch When(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
Comment