I have been getting this from today and have not made any change to my code since yesterday when all was working fine...
When I enable my strategy from the strategy tab, oninitialize is called, it runs though without error. Then the enable box is unticked and nothing else. A breakpoint in onstartup shows it is never reached. All I can see is that Dispose() is called.
This happens when connected to IB. If I connect to market replay and create a new strategy which is identical, the strategy runs fine. I am using NT 7.01... 13 and tws Build 935.3, Jan 17.092., API_Version=9.69
The log tab shows the following interesting stuff:
6/20/2013 11:50:06 AM Strategy Enabling NinjaScript strategy 'CCLvsCUK-SPP12300-IP0.25-HD100-SF0.7/71cf31b50fa2401faa99ad0bb324d185' : On starting a real-time strategy - StrategySync=SubmitImmediately SyncAccountPosition=False EntryHandling=AllEntries EntriesPerDirection=1 StopTargetHandling=PerEntryExecution ErrorHandling=TakeNoAction ExitOnClose=False Set order quantity by=Strategy ConnectionLossHandling=KeepRunning DisconnectDelaySeconds=10 CancelEntryOrdersOnDisable=True CancelExitOrdersOnDisable=True CalculateOnBarClose=False MaxRestarts=4 in 5 minutes . . 6/20/2013 11:48:42 AM Default Session Break (Version 7.0.1000.13) 6/20/2013 11:48:41 AM Default Verifying license at primary server...
Here the call stack leading to the Dispose method:
2ddd1a4b0d5641788d374afd040a914c.dll!NinjaTrader.Strategy.Strategy.Dispose() Line 57 C# > NinjaTrader.Core.dll!NinjaTrader.Strategy.StrategyGridDisplay.EnableStrategy(NinjaTrader.Strategy.StrategyBase strategy) + 0x4ad bytes NinjaTrader.Core.dll!NinjaTrader.Strategy.StrategyGridDisplay.OnCellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) + 0x3ea bytes Infragistics2.Win.UltraWinGrid.v8.3.dll!Infragistics.Win.UltraWinGrid.UltraGrid.OnCellChange(Infragistics.Win.UltraWinGrid.CellEventArgs e) + 0x7f bytes Infragistics2.Win.UltraWinGrid.v8.3.dll!Infragistics.Win.UltraWinGrid.UltraGrid.FireEvent(Infragistics.Win.UltraWinGrid.GridEventIds id, System.EventArgs e) + 0x6f1 bytes Infragistics2.Win.UltraWinGrid.v8.3.dll!Infragistics.Win.UltraWinGrid.UltraGridCell.CellChangeHelper(object sender, System.EventArgs ev) + 0x1c5 bytes Infragistics2.Win.v8.3.dll!Infragistics.Win.EmbeddableEditorBase.RaiseValueChangedEvent() + 0x56 bytes Infragistics2.Win.v8.3.dll!Infragistics.Win.CheckEditor.SetEditorValueInternal(object newVal) + 0xbb bytes Infragistics2.Win.v8.3.dll!Infragistics.Win.CheckEditor.SetNextState(System.Windows.Forms.CheckState newState) + 0x4a bytes Infragistics2.Win.v8.3.dll!Infragistics.Win.CheckEditor.SetNextState() + 0x14e bytes Infragistics2.Win.v8.3.dll!Infragistics.Win.CheckEditorCheckBoxUIElement.OnCheckStateChange() + 0x58 bytes Infragistics2.Win.v8.3.dll!Infragistics.Win.CheckBoxUIElement.OnClick() + 0x99 bytes Infragistics2.Win.v8.3.dll!Infragistics.Win.ControlUIElementBase.ProcessMouseUpHelper(object sender, System.Windows.Forms.MouseEventArgs e) + 0x2cf bytes Infragistics2.Win.v8.3.dll!Infragistics.Win.ControlUIElementBase.ProcessMouseUp(object sender, System.Windows.Forms.MouseEventArgs e) + 0x179 bytes Infragistics2.Win.v8.3.dll!Infragistics.Win.Utilities.ProcessEvent(System.Windows.Forms.Control control, Infragistics.Win.ControlUIElementBase.ProcessEvent eventToProcess, System.EventArgs e) + 0x3be bytes Infragistics2.Win.v8.3.dll!Infragistics.Win.UltraControlBase.OnMouseUp(System.Windows.Forms.MouseEventArgs e) + 0x2a bytes NinjaTrader.Core.dll!NinjaTrader.Gui.Grid.NTGrid2.OnMouseUp(System.Windows.Forms.MouseEventArgs e) + 0x64 bytes System.Windows.Forms.dll!System.Windows.Forms.Control.WmMouseUp(ref System.Windows.Forms.Message m, System.Windows.Forms.MouseButtons button, int clicks) + 0x28f bytes System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc(ref System.Windows.Forms.Message m) + 0x885 bytes System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.OnMessage(ref System.Windows.Forms.Message m) + 0x10 bytes System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.WndProc(ref System.Windows.Forms.Message m) + 0x31 bytes System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.Callback(System.IntPtr hWnd, int msg, System.IntPtr wparam, System.IntPtr lparam) + 0x5a bytes System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DefWndProc(ref System.Windows.Forms.Message m) + 0x130 bytes System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.WndProc(ref System.Windows.Forms.Message m) + 0x5 bytes Infragistics2.Win.v8.3.dll!Infragistics.Win.EditorWithMask.AccessibleTextManager.AccessibleTextSubclasser.WndProc(ref System.Windows.Forms.Message msg) + 0x8d bytes System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.Callback(System.IntPtr hWnd, int msg, System.IntPtr wparam, System.IntPtr lparam) + 0x5a bytes System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DefWndProc(ref System.Windows.Forms.Message m) + 0x130 bytes System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.WndProc(ref System.Windows.Forms.Message m) + 0x5 bytes Infragistics2.Win.v8.3.dll!Infragistics.Win.FormattedLinkLabel.FormattedLinkEditor.AccessibleTextManager.AccessibleTextSubclasser.WndProc(ref System.Windows.Forms.Message msg) + 0x80 bytes System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.Callback(System.IntPtr hWnd, int msg, System.IntPtr wparam, System.IntPtr lparam) + 0x5a bytes System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DefWndProc(ref System.Windows.Forms.Message m) + 0x130 bytes System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.WndProc(ref System.Windows.Forms.Message m) + 0x5 bytes Infragistics2.Win.v8.3.dll!Infragistics.Win.FormattedLinkLabel.IMENativeWindowManager.IMENativeWindow.WndProc(ref System.Windows.Forms.Message m) + 0x3a bytes System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr hWnd, int msg, System.IntPtr wparam, System.IntPtr lparam) + 0x57 bytes [Native to Managed Transition] [Managed to Native Transition] System.Windows.Forms.dll!System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(int dwComponentID, int reason, int pvLoopData) + 0x24e bytes System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(int reason, System.Windows.Forms.ApplicationContext context) + 0x177 bytes System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoop(int reason, System.Windows.Forms.ApplicationContext context) + 0x61 bytes System.Windows.Forms.dll!System.Windows.Forms.Application.Run() + 0x2e bytes NinjaTrader.exe!NinjaTrader.NTMain.Main() + 0x9b bytes
Comment