NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > Application Technical Support > Miscellaneous Support > Historical Version 7 Beta Threads > Version 7 Beta General Questions & Bug Reports

Version 7 Beta General Questions & Bug Reports Ask questions here and post bug reports.

 
 
Thread Tools Display Modes
Old 08-23-2010, 09:03 AM   #1
zark.be
Senior Member
 
Join Date: Aug 2008
Posts: 102
Thanks: 3
Thanked 2 times in 1 post
Default 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)
zark.be is offline  
Old 08-23-2010, 09:18 AM   #2
NinjaTrader_Brett
NinjaTrader Customer Service
 
NinjaTrader_Brett's Avatar
 
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,498
Thanks: 109
Thanked 291 times in 280 posts
Default

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.
NinjaTrader_Brett is offline  
Old 08-23-2010, 09:22 AM   #3
zark.be
Senior Member
 
Join Date: Aug 2008
Posts: 102
Thanks: 3
Thanked 2 times in 1 post
Default

I just sent it now.

ticket : 358862
zark.be is offline  
Old 08-23-2010, 10:00 AM   #4
NinjaTrader_Brett
NinjaTrader Customer Service
 
NinjaTrader_Brett's Avatar
 
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,498
Thanks: 109
Thanked 291 times in 280 posts
Default

Hello,

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

Thank you for your patience.
NinjaTrader_Brett is offline  
Old 08-23-2010, 01:47 PM   #5
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

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();
NinjaTrader_Josh is offline  
Old 08-24-2010, 02:59 AM   #6
zark.be
Senior Member
 
Join Date: Aug 2008
Posts: 102
Thanks: 3
Thanked 2 times in 1 post
Default

indeed that solves it. force of habit
zark.be is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
migrating templates from 6.5 saroj Version 7 Beta General Questions & Bug Reports 5 05-09-2010 02:46 PM
Migrating Data From NinjaTrader 6.5 to 7 NinjaTrader_Ray Critical Information - Please review 0 10-02-2009 10:57 AM
Migrating from one computer to another tradinginzen Miscellaneous Support 2 02-16-2009 09:12 AM
MIgrating a third-party indicator daven Indicator Development 3 06-03-2008 06:10 AM
Migrating from 6 to 6.5 carrmcc Historical NinjaTrader 6.5 Beta Threads 3 03-08-2008 02:44 AM


All times are GMT -6. The time now is 05:40 AM.