I ran a strategy in Market Replay mode at 500x speed with debug enabled and visual studio 10 attached and it caught an Access Violation Exception. I've seen this crash before come up randomly with different strategies. I see this error in the trace:
2011-03-05 09:19:48:391 Strategy.StrategyBase.CancelAllOrders: Order='292f0ac7ab584e20ac391dbe598b4b57/Replay101' Name='Trail stop' State=Filled Instrument='CL 03-11' Action=Sell Limit price=0 Stop price=90.24 Quantity=1 Strategy='test4' Type=Stop Tif=Day Oco='0e30999354dc461786e77ae99275db5f-255' Filled=1 Fill price=90.24 Token='292f0ac7ab584e20ac391dbe598b4b57' Gtd='12/1/2099 12:00:00 AM' 2011-03-05 09:19:49:088 in OnUnhandledThreadException 2011-03-05 09:19:49:101 ********* exception trapped ********* 2011-03-05 09:19:49:102 Unable to cast object of type 'System.DBNull' to type 'NinjaTrader.Strategy.StrategyBase'. 2011-03-05 09:19:49:102 at NinjaTrader.Strategy.StrategyGridDisplay.OnStrategyStatus(Object sender, StatusChangedEventArgs e) at NinjaTrader.Strategy.StatusChangedEventHandler.Invoke(Object sender, StatusChangedEventArgs e) at NinjaTrader.Strategy.StrategyBase.StoppedNow() at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj) at System.Threading.ExecutionContext.runTryCode(Object userData) at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme) at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
3/5/2011 9:19:46 AM|1|32|Order='292f0ac7ab584e20ac391dbe598b4b57/Replay101' Name='Trail stop' New state=Working Instrument='CL 03-11' Action=Sell Limit price=0 Stop price=90.24 Quantity=1 Type=Stop Filled=0 Fill price=0 Error=NoError Native error='' 3/5/2011 9:19:46 AM|1|32|Order='292f0ac7ab584e20ac391dbe598b4b57/Replay101' Name='Trail stop' New state=Filled Instrument='CL 03-11' Action=Sell Limit price=0 Stop price=90.24 Quantity=1 Type=Stop Filled=1 Fill price=90.24 Error=NoError Native error='' 3/5/2011 9:19:46 AM|1|16|Execution='0ecf6e570dfa46599a75d58b4bed6cd3' Instrument='CL 03-11' Account='Replay101' Exchange=Default Price=90.24 Quantity=1 Market position=Short Operation=Insert Order='292f0ac7ab584e20ac391dbe598b4b57' Time='1/20/2011 9:04:07 AM' 3/5/2011 9:19:46 AM|1|64|Instrument='CL 03-11' Account='Replay101' Avg price=90.24 Quantity=0 Market position=Long Operation=Remove Currency=Unknown 3/5/2011 9:19:48 AM|1|128|Disabling NinjaScript strategy 'test4/f17a7704b70f437989dbb20e593f0708'
Thanks,
Tim.
Comment