Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Migrating an Indicator from 6.5 to 7

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

    Migrating an Indicator from 6.5 to 7

    Hello

    i'm having a serious issue with an indicator i made for 6.5 and that makes 7 crash.
    Since i don't have symbols i can't really look more into it.

    I can send you the indicator by mail so you can test it . Its pretty basic, works on its own. But when used from within a strategy , it just crashes ninja.

    Code:
    ---- Assert Short Message ----
    IndicatorBase.InputInitialize
    ---- Assert Long Message ----
    
    
        at IndicatorBase.InputInitialize()  
        at StrategyBase.SetInput(Bars[] newBarsArray)  
        at ChartControl.Add(StrategyBase strategyTemplate)  
        at ChartStrategies.Apply()  
        at ChartStrategies.OnOkButtonClick(Object sender, EventArgs e)  
        at Control.OnClick(EventArgs e)  
        at Button.OnClick(EventArgs e)  
        at Button.OnMouseUp(MouseEventArgs mevent)  
        at Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)  
        at Control.WndProc(Message& m)  
        at ButtonBase.WndProc(Message& m)  
        at Button.WndProc(Message& m)  
        at ControlNativeWindow.OnMessage(Message& m)  
        at ControlNativeWindow.WndProc(Message& m)  
        at NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)  
        at UnsafeNativeMethods.DispatchMessageW(MSG& msg)  
        at ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)  
        at ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)  
        at ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)  
        at Application.RunDialog(Form form)  
        at Form.ShowDialog(IWin32Window owner)  
        at Form.ShowDialog()  
        at ChartControl.OnMenuItem(Object sender, EventArgs e)  
        at ToolStripItem.RaiseEvent(Object key, EventArgs e)  
        at ToolStripMenuItem.OnClick(EventArgs e)  
        at ToolStripItem.HandleClick(EventArgs e)  
        at ToolStripItem.HandleMouseUp(MouseEventArgs e)  
        at ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)  
        at ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)  
        at ToolStrip.OnMouseUp(MouseEventArgs mea)  
        at ToolStripDropDown.OnMouseUp(MouseEventArgs mea)  
        at Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)  
        at Control.WndProc(Message& m)  
        at ScrollableControl.WndProc(Message& m)  
        at ToolStrip.WndProc(Message& m)  
        at ToolStripDropDown.WndProc(Message& m)  
        at ControlNativeWindow.OnMessage(Message& m)  
        at ControlNativeWindow.WndProc(Message& m)  
        at NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)  
        at UnsafeNativeMethods.DispatchMessageW(MSG& msg)  
        at ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)  
        at ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)  
        at ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)  
        at Application.Run()  
        at NTMain.Main()  
    
    2010-08-23 16:55:01:062 ---- DEBUG ASSERTION FAILED ----
    ---- Assert Short Message ----
    barsArray[0] == null
    ---- Assert Long Message ----
    
    
        at IndicatorBase.InputInitialize()  
        at StrategyBase.SetInput(Bars[] newBarsArray)  
        at ChartControl.Add(StrategyBase strategyTemplate)  
        at ChartStrategies.Apply()  
        at ChartStrategies.OnOkButtonClick(Object sender, EventArgs e)  
        at Control.OnClick(EventArgs e)  
        at Button.OnClick(EventArgs e)  
        at Button.OnMouseUp(MouseEventArgs mevent)  
        at Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)  
        at Control.WndProc(Message& m)  
        at ButtonBase.WndProc(Message& m)  
        at Button.WndProc(Message& m)  
        at ControlNativeWindow.OnMessage(Message& m)  
        at ControlNativeWindow.WndProc(Message& m)  
        at NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)  
        at UnsafeNativeMethods.DispatchMessageW(MSG& msg)  
        at ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)  
        at ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)  
        at ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)  
        at Application.RunDialog(Form form)  
        at Form.ShowDialog(IWin32Window owner)  
        at Form.ShowDialog()  
        at ChartControl.OnMenuItem(Object sender, EventArgs e)  
        at ToolStripItem.RaiseEvent(Object key, EventArgs e)  
        at ToolStripMenuItem.OnClick(EventArgs e)  
        at ToolStripItem.HandleClick(EventArgs e)  
        at ToolStripItem.HandleMouseUp(MouseEventArgs e)  
        at ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)  
        at ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)  
        at ToolStrip.OnMouseUp(MouseEventArgs mea)  
        at ToolStripDropDown.OnMouseUp(MouseEventArgs mea)  
        at Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)  
        at Control.WndProc(Message& m)  
        at ScrollableControl.WndProc(Message& m)  
        at ToolStrip.WndProc(Message& m)  
        at ToolStripDropDown.WndProc(Message& m)  
        at ControlNativeWindow.OnMessage(Message& m)  
        at ControlNativeWindow.WndProc(Message& m)  
        at NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)  
        at UnsafeNativeMethods.DispatchMessageW(MSG& msg)  
        at ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)  
        at ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)  
        at ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)  
        at Application.Run()  
        at NTMain.Main()  
    
    2010-08-23 16:55:02:406 in OnUnhandledThreadException
    2010-08-23 16:55:02:406 ********* exception trapped *********
    2010-08-23 16:55:02:406 Object reference not set to an instance of an object.
    2010-08-23 16:55:02:421    at NinjaTrader.Indicator.IndicatorBase.InputInitialize()
       at NinjaTrader.Strategy.StrategyBase.SetInput(Bars[] newBarsArray)
       at NinjaTrader.Gui.Chart.ChartControl.Add(StrategyBase strategyTemplate)
       at NinjaTrader.Gui.Chart.ChartStrategies.Apply()
       at NinjaTrader.Gui.Chart.ChartStrategies.OnOkButtonClick(Object sender, EventArgs e)
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    #2
    Hello,

    What ticket number did you get when you sent in the note to support as I do not see it here. We would need to test this with youy NinjaScript.

    I look forward to assisting you further.
    BrettNinjaTrader Product Management

    Comment


      #3
      I just sent it now.

      ticket : 358862

      Comment


        #4
        Hello,

        Got it, I will look into this and get back to you via email.

        Thank you for your patience.
        BrettNinjaTrader Product Management

        Comment


          #5
          zark.be,

          The issue is that your code uses this line:

          uOHLC = new UOHLC();

          You do not need the "new" in there. Just do

          uOHLC = UOHLC();
          Josh P.NinjaTrader Customer Service

          Comment


            #6
            indeed that solves it. force of habit

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            598 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            343 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            103 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            556 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            555 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X