Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error on calling "OnRender" & Error on calling "OnBarUpdate" method

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

    Error on calling "OnRender" & Error on calling "OnBarUpdate" method

    Hello,

    I get the following errors in my NT8 Log...

    Error on calling "OnRender" & Error on calling "OnBarUpdate" method

    What do I do to find out what is causing them?

    How do I fix those errors?

    Screenshots attached.

    Thanks,

    #2
    Hello i2w8am9ii2,

    The OnRender errors indicate an indicator is trying to access a price bar that does not exist in the chart. Unfortunately the error message does not say what indicator is causing it. I suggest to increase the amount of historical data in the chart and check if these errors persist.

    I'm not sure what the OnBarUpdate errors indicate - I'm not a programmer myself. The indicator is not listed in the error message again. Is there an indicator in your workspace that does not work as expected?

    When I search this error on the support forum, I came across the forum thread below (see post #7).
    Hi, I am getting two errors. How do I handle/debug these two errors: Error 1: My strategy disables when I get the following two errors: 2020-10-27 16:04:53:685|3|4|Indicator 'SMA': Error on calling 'OnBarUpdate' method on bar 2532: You are accessing an index with a value that is invalid since it is out-of-range. I.E.


    This generally means that you have used a foreach loop on a collection and then modified that collection during the iteration of the collection. A for loop would be used to avoid this error. You can hit this error in some cases by calling NinjaScript syntax like the DrawingTools collection. If you have more details on what code was used when this was generated we could review that.

    JasonNinjaTrader Customer Service

    Comment


      #3
      Hi Jason,

      Thanks for your reply and for the info.

      The indicators on my workspace appear to be working as expected, for the most part. I have hired a programmer to build a new indicator for me, and we are still going back and forth working things out.

      I posted here because he sometimes takes forever to get back to me and sometimes I think that his understanding of English is not the best.

      The programmer just gave me a new version of the indicator, so I'll check and see if the error messages persist.

      Take care,

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by geotrades1, Today, 10:02 AM
      1 response
      5 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by ender_wiggum, Today, 09:50 AM
      1 response
      5 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by rajendrasubedi2023, Today, 09:50 AM
      1 response
      12 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by bmartz, Today, 09:30 AM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_Erick  
      Started by geddyisodin, Today, 05:20 AM
      3 responses
      27 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Working...
      X