• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

What Does This Error Mean

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

    What Does This Error Mean

    Hello,

    Does anyone what this error means:

    Error on calling 'OnBarUpdate' method for indicator 'myIndy' on bar 5: Bar index needs to be greater/equal 0

    Thank you!

    #2
    Hello,

    Thank you for writing in.

    I will be reviewing your error and this case. When I have additional details I will follow up here on this thread.

    Comment


      #3
      Hello,

      Thank you for writing in.

      When your indicator is looking at the Bar object, for instance CurrentBar, you have to make sure that you have enough bars to look at.

      Many indicator have a parameter of Period meaning how many bars to calculate to plot. Let's take EMA and I set the period to 10, the indicator has to verify 10 bars before calculating.

      For example:

      if (CurrentBar <= 10)

      return;

      For further information about this, please refer to the following link: http://ninjatrader.com/support/forum...ead.php?t=3170

      Please feel free to contact us with questions and inquiries.

      Comment


        #4
        Originally posted by NinjaTrader_PatrickY View Post
        Hello,

        Thank you for writing in.

        When your indicator is looking at the Bar object, for instance CurrentBar, you have to make sure that you have enough bars to look at.

        Many indicator have a parameter of Period meaning how many bars to calculate to plot. Let's take EMA and I set the period to 10, the indicator has to verify 10 bars before calculating.

        For example:

        if (CurrentBar <= 10)

        return;

        For further information about this, please refer to the following link: http://ninjatrader.com/support/forum...ead.php?t=3170

        Please feel free to contact us with questions and inquiries.
        Thank you Patrick! That did the trick!

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by safbrathpro, Today, 05:51 AM
        0 responses
        4 views
        0 likes
        Last Post safbrathpro  
        Started by abfefmu, Today, 05:33 AM
        0 responses
        4 views
        0 likes
        Last Post abfefmu
        by abfefmu
         
        Started by bbdjad, Today, 04:36 AM
        0 responses
        4 views
        0 likes
        Last Post bbdjad
        by bbdjad
         
        Started by mittie3, Today, 03:33 AM
        0 responses
        7 views
        0 likes
        Last Post mittie3
        by mittie3
         
        Started by Againmain1, Today, 03:04 AM
        0 responses
        10 views
        1 like
        Last Post Againmain1  
        Working...
        X