when using a strategy in the Strategy Analyzer, and loading a saved template of that strategy, the DataSeries can be corrupted.
See pic1 which has the strategy set.
See pic2 which is what is left after loading the template.
If user clicks Run, NinjaTrader crashes and quits.
Here is some trace file content:
2020-07-08 17:22:14:853 *************** unhandled exception trapped ***************
2020-07-08 17:22:14:853 Object reference not set to an instance of an object.
2020-07-08 17:22:14:855 System.NullReferenceException: Object reference not set to an instance of an object.
at NinjaTrader.NinjaScript.NinjaScriptBase.<>c__Displ ayClass135_3.<InitializeBars>b__6(Object x)
at System.Threading.ExecutionContext.RunInternal(Exec utionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System. Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
I've attached the template for you to peruse.
Thanks,
saltminer
Comment