Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Assertion failed error BarsArray[0] == null

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

    Assertion failed error BarsArray[0] == null

    I've been trying to modify the AutoTrendLine indicator to work with other indicators, instead of just price. I have been able to get it to work by coding in the indicator, but if I try to select the indicator from the "input series" when adding the indicator to a chart, I get the error shown below.

    At first I thought is was my modifications, but I tried doing the same thing with the AutoTrendLine indicator (modified to work with NT7), and get the same error. What seems odd is that if I select "abort" on that message NT shuts down, and when I start it back up again, it comes back with the indicator working using the selected "input series" I chose when I applied it to the chart. I can also at that point "reload ninjascript" (F5) and it works fine.

    Putting in a few print statements, it seems to go through initialize(), but it never gets to OnBarUpdate().

    Any ideas?

    VT
    Attached Files

    #2
    Hello VTrader,

    Thank you for the report. I have forwarded details of this error message to our development team, in case there is something not working properly with NinjaTrader's handling of this indicator applied to other input series.

    You may be able to adapt autotrendline for other indicators. See here for a recent discussion. One of our members shared his approach to this:
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thanks Ryan,

      I do have the AutoTL indicator working properly if I put the indicator to base it on in the code. I just wanted to have the flexibility to select the indicator when it is applied to the chart in the input series selection box.

      It does seem strange to me though, that it produces the error when first applied to the chart, but when I restart after the crash it loads fine, and works as expected.

      Thanks for your help.

      VT

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      578 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      334 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      554 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      551 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X