Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error compiling indicator in Ninja7.

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

    Error compiling indicator in Ninja7.

    Hello all,

    I receive this error when trzing to compile my indicator in NT7(last version):

    Error on calling 'OnBarUpdate' method for indicator 'EmaTrend' on bar 0: You are accessing an index with a value that is invalid since its out of range. I.E. accessing a series [barsAgo] with a value of 5 when there are only 4 bars on the chart.

    here a copy of the code that I created:

    // Accelleration
    if (
    EMA(8)[0] > EMA(8)[1]
    && EMA(13)[0] > EMA(13)[1]
    && EMA(21)[0] > EMA(21)[1]
    )

    I just want to say: if EMA8(actual bar) > EMA8(precedent bar).. then

    did I missed something?

    Thanks!

    Frederic

    #2
    Hello,

    Thanks for your forum post.

    There is one small thing your missing which is located here:



    Let me know if I can be of further assistance.
    BrettNinjaTrader Product Management

    Comment


      #3
      Hello Brett,

      thanks for info, it helped me. Have a nice day

      Regards,
      Frederic

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      160 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      307 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      244 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      348 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      178 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X