Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unhandled exception: object reference not set to an instance of an object

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

    Unhandled exception: object reference not set to an instance of an object

    This relates to those strategies that hang around in the Strategies Tab of the Control Center (which I don't mind, saves me from having to add them again everytime, BUT.. )


    I thought I could save myself time from having to add 8 strategies by adding them to separate charts (ES03-14, ES06-14, ... , ES12-15), running my Playback-market replay, Swap out strategy code, compile, restart.

    I wanted to change this Exit on Session Close option...I don't need it and it shows up for everyday in the LOG, for every strategy.

    So after my restart, I connected to Playback-MR, right clicked on a chart, Selected strategies, selected my strategy, unchecked Exit On session close, and clicked OK - and got the message. This is surely not related to the unchecking of the Exit on Session Close - but more related to the disconnect between what is going on with the Strategy in the chart and in the Strategies tab. I was able to remove/add and have 2 ES 03-14 strategies in the strategy tab, yet only 1 on the chart. So a zombie was hanging around.

    I am able to reproduce this on every chart.






    2015-10-24 17:01:54:161 (Playback Connection) Cbi.Account.AccountItemCallback: account='Playback101' accountItem=CashValue currency=UsDollar value=*****
    2015-10-24 17:02:15:025 *************** unhandled exception trapped ***************
    2015-10-24 17:02:15:025 Object reference not set to an instance of an object.
    2015-10-24 17:02:15:033 System.NullReferenceException: Object reference not set to an instance of an object.
    at NinjaTrader.NinjaScript.StrategyBase.GetTradingHou rs(Instrument instrument)
    at NinjaTrader.NinjaScript.StrategyBase.CreateNewGene ration(Nullable`1 forcePlotsMaximumBarsLookBackInfinite, Nullable`1 includeTradeHistoryInBacktest)
    at NinjaTrader.Gui.Chart.ChartControl.StrategyDisable (StrategyRenderBase originalStrategy, StrategyRenderBase strategyClone)
    at NinjaTrader.Gui.Chart.ChartControl.ApplyStrategy(S trategyRenderBase originalStrategy, StrategyRenderBase strategy, ChartBars cb, Boolean isAdded)
    at NinjaTrader.Gui.Chart.ChartControl.HandleStrategie s(List`1 strategiesChanged, IEnumerable`1 strategyBases, List`1 strategiesToApply)
    at NinjaTrader.Gui.Chart.ChartControl.<>c__DisplayCla ss76_0.<OnStrategiesHotKey>b__6()
    at NinjaTrader.Gui.Chart.ChartControl.OnStrategiesHot Key(Object sender, KeyEventArgs e)
    at NinjaTrader.Gui.Chart.ChartCommands.StrategiesExec uted(Object sender, ExecutedRoutedEventArgs e)
    at System.Windows.Input.CommandBinding.OnExecuted(Obj ect sender, ExecutedRoutedEventArgs e)
    at System.Windows.Input.CommandManager.ExecuteCommand Binding(Object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding)
    at System.Windows.Input.CommandManager.FindCommandBin ding(CommandBindingCollection commandBindings, Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
    at System.Windows.Input.CommandManager.FindCommandBin ding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
    at System.Windows.Input.CommandManager.OnExecuted(Obj ect sender, ExecutedRoutedEventArgs e)
    at System.Windows.RoutedEventArgs.InvokeHandler(Deleg ate handler, Object target)
    at System.Windows.EventRoute.InvokeHandlersImpl(Objec t source, RoutedEventArgs args, Boolean reRaised)
    at System.Windows.UIElement.RaiseEventImpl(Dependency Object sender, RoutedEventArgs args)
    at System.Windows.Input.RoutedCommand.ExecuteImpl(Obj ect parameter, IInputElement target, Boolean userInitiated)
    at System.Windows.Controls.MenuItem.InvokeClickAfterR ender(Object arg)
    at System.Windows.Threading.ExceptionWrapper.Internal RealCall(Delegate callback, Object args, Int32 numArgs)
    at MS.Internal.Threading.ExceptionFilterHelper.TryCat chWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
    2015-10-24 17:02:57:914 *************** unhandled exception trapped ***************
    2015-10-24 17:02:57:915 Object reference not set to an instance of an object.
    2015-10-24 17:02:57:915 System.NullReferenceException: Object reference not set to an instance of an object.
    at NinjaTrader.NinjaScript.StrategyBase.GetTradingHou rs(Instrument instrument)
    at NinjaTrader.NinjaScript.StrategyBase.CreateNewGene ration(Nullable`1 forcePlotsMaximumBarsLookBackInfinite, Nullable`1 includeTradeHistoryInBacktest)
    at NinjaTrader.Gui.Chart.ChartControl.StrategyDisable (StrategyRenderBase originalStrategy, StrategyRenderBase strategyClone)
    at NinjaTrader.Gui.Chart.ChartControl.ApplyStrategy(S trategyRenderBase originalStrategy, StrategyRenderBase strategy, ChartBars cb, Boolean isAdded)
    at NinjaTrader.Gui.Chart.ChartControl.HandleStrategie s(List`1 strategiesChanged, IEnumerable`1 strategyBases, List`1 strategiesToApply)
    at NinjaTrader.Gui.Chart.ChartControl.<>c__DisplayCla ss76_0.<OnStrategiesHotKey>b__6()
    at NinjaTrader.Gui.Chart.ChartControl.OnStrategiesHot Key(Object sender, KeyEventArgs e)
    at NinjaTrader.Gui.Chart.ChartCommands.StrategiesExec uted(Object sender, ExecutedRoutedEventArgs e)
    at System.Windows.Input.CommandBinding.OnExecuted(Obj ect sender, ExecutedRoutedEventArgs e)
    at System.Windows.Input.CommandManager.ExecuteCommand Binding(Object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding)
    at System.Windows.Input.CommandManager.FindCommandBin ding(CommandBindingCollection commandBindings, Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
    at System.Windows.Input.CommandManager.FindCommandBin ding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
    at System.Windows.Input.CommandManager.OnExecuted(Obj ect sender, ExecutedRoutedEventArgs e)
    at System.Windows.RoutedEventArgs.InvokeHandler(Deleg ate handler, Object target)
    at System.Windows.EventRoute.InvokeHandlersImpl(Objec t source, RoutedEventArgs args, Boolean reRaised)
    at System.Windows.UIElement.RaiseEventImpl(Dependency Object sender, RoutedEventArgs args)
    at System.Windows.Input.RoutedCommand.ExecuteImpl(Obj ect parameter, IInputElement target, Boolean userInitiated)
    at System.Windows.Controls.MenuItem.InvokeClickAfterR ender(Object arg)
    at System.Windows.Threading.ExceptionWrapper.Internal RealCall(Delegate callback, Object args, Int32 numArgs)
    at MS.Internal.Threading.ExceptionFilterHelper.TryCat chWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

    #2
    Hello,

    Thank you for contacting us to report the issue.

    So that I may investigate I would ask that you contact me by email at PlatformSupport [AT] NinjaTrader [DOT] com. In your message please include a link to this forum thread and a copy of today's trace files. You will find these diagnostic file in the Documents > NinjaTrader 8 > Trace folder. I will need to review a copy of the files which are named 'trace.20151024.XXXXX.txt'.
    Drew O.NinjaTrader Customer Service

    Comment


      #3
      NT8B8 Close but not the same

      NT8B8, 64 bit , Windows 7

      After restarting from a previous crash, http://ninjatrader.com/support/forum...ad.php?t=82252 , I tried to remove the previous strategy XMyCustomStrategyX, and crashed.

      Restart was fine.
      Attached Files
      Last edited by NinjaTrader_DrewO; 02-15-2016, 07:27 AM.

      Comment


        #4
        Hello sledge,

        We removed your attachments for security reasons. Please contact me by email at PlatformSupport [AT] NinjaTrader [DOT] com. In your message please include a link to this forum thread.
        Drew O.NinjaTrader Customer Service

        Comment


          #5
          Not sure what the "security" issue was... there was no key in the file? I couldn't find it.
          I removed my machineId.

          ?

          I'll send it in.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by frankthearm, Yesterday, 09:08 AM
          14 responses
          47 views
          0 likes
          Last Post NinjaTrader_Clayton  
          Started by gentlebenthebear, Today, 01:30 AM
          2 responses
          13 views
          0 likes
          Last Post gentlebenthebear  
          Started by Kaledus, Today, 01:29 PM
          2 responses
          8 views
          0 likes
          Last Post Kaledus
          by Kaledus
           
          Started by PaulMohn, Today, 12:36 PM
          2 responses
          16 views
          0 likes
          Last Post PaulMohn  
          Started by Conceptzx, 10-11-2022, 06:38 AM
          2 responses
          56 views
          0 likes
          Last Post PhillT
          by PhillT
           
          Working...
          X