Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Market Analyzer unhandled exception

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

    Market Analyzer unhandled exception

    I have built some templates for Market Analyzer that worked until today. After making some indicator code changes, I get an "unhandled exception error for array index out of range" when I try to load some of the Analyzer templates. I've surrounded all of my indicator code with try/catch but still I get this error. Is there a NT log file I can look at or can I attach Visual Studio to NT to track down what's causing this error?
    thanks,

    #2
    Here's the error from the NT trace file:
    2020-02-21 11:34:38:594 *************** unhandled exception trapped ***************
    2020-02-21 11:34:38:594 Index was outside the bounds of the array.
    2020-02-21 11:34:38:594 System.IndexOutOfRangeException: Index was outside the bounds of the array.
    at NinjaTrader.Gui.MarketAnalyzer.MarketAnalyzerGrid. Restore(XElement element, Boolean asTemplate)
    at NinjaTrader.Gui.MarketAnalyzer.MarketAnalyzerGrid. ApplyTemplate(String fileName)
    at NinjaTrader.Gui.MarketAnalyzer.MarketAnalyzerGrid. OnTemplateLoad(Object sender, RoutedEventArgs e)
    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.Controls.MenuItem.InvokeClickAfterR ender(Object arg)
    at System.Windows.Threading.ExceptionWrapper.Internal RealCall(Delegate callback, Object args, Int32 numArgs)
    at System.Windows.Threading.ExceptionWrapper.TryCatch When(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
    2020-02-21 11:35:01:242 *************** unhandled exception trapped ***************
    2020-02-21 11:35:01:242 Index was outside the bounds of the array.
    2020-02-21 11:35:01:243 System.IndexOutOfRangeException: Index was outside the bounds of the array.
    at NinjaTrader.Gui.MarketAnalyzer.MarketAnalyzerGrid. Restore(XElement element, Boolean asTemplate)
    at NinjaTrader.Gui.MarketAnalyzer.MarketAnalyzerGrid. ApplyTemplate(String fileName)
    at NinjaTrader.Gui.MarketAnalyzer.MarketAnalyzerGrid. OnTemplateLoad(Object sender, RoutedEventArgs e)
    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.Controls.MenuItem.InvokeClickAfterR ender(Object arg)
    at System.Windows.Threading.ExceptionWrapper.Internal RealCall(Delegate callback, Object args, Int32 numArgs)
    at System.Windows.Threading.ExceptionWrapper.TryCatch When(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

    Comment


      #3
      Hi tecmisc1, thanks for your post.

      Do you get the same problem when you make a template with no custom indicators? If not there is some problem with the public properties your script is using. If you could reduce the script as much as possible to where it still re-creates the problem, it might make it easier to realize what the issue is.

      I look forward to hearing from you.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      44 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      54 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      34 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      94 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      56 views
      0 likes
      Last Post PaulMohn  
      Working...
      X