Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnStartup not called

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    OnStartup not called

    Hello,

    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:
    Code:
    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:
    Code:
     	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
    Last edited by benoirat; 06-20-2013, 09:59 AM.

    #2
    Hello benoirat,

    First, you may want to get on the current supported version of IB TWS and NinjaTrader.

    The current version of NinjaTrader and Traders Workstation supported together is NinjaTrader 7.0.1000.14 and Traders Workstation 938.1.

    You may use the following link to download the supported version of TWS.




    Here is a link so that you may upgrade NinjaTrader, note that you will have to shutdown NinjaTrader before the upgrade.




    Let us know if the issue persists on the updated versions.
    JCNinjaTrader Customer Service

    Comment


      #3
      Thank you,

      Indeed after an upgrade and reboot it seems working.

      Thanks for your support
      Last edited by benoirat; 06-20-2013, 10:19 AM.

      Comment


        #4
        Hello benoirat,

        Thanks for the update.

        What message does it say inside of the Log tab of the Control Center?

        Also could you post a your code of OnStartUp() so that we may take a quick look at it?
        JCNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by cre8able, Today, 01:16 PM
        2 responses
        9 views
        0 likes
        Last Post cre8able  
        Started by chbruno, 04-24-2024, 04:10 PM
        3 responses
        48 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by samish18, Today, 01:01 PM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_LuisH  
        Started by WHICKED, Today, 12:56 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by WHICKED, Today, 12:45 PM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X