Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnRender Error on Bar -1 ?

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

    OnRender Error on Bar -1 ?

    Once or twice a day I have been getting this error:

    Error on calling 'OnRender' method on bar -1: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

    Despite my error trapping, the indicator disappears from the chart until I hit F5, and then eveyrthing is OK.

    The indicator is on 10 different charts, but the error always occurs on only one chart, never on the others.

    Apart from not knowing how to correct the error, I don't understand what a reference to "bar -1" could be.

    Any help would be appreciated.

    #2
    Hello palinuro,

    Thanks for your post.

    If it happens on only one chart then it sounds like you have a repeatable condition to test with. Is it possible that your code for a barsago reference could be using -1 or some other negative value? You could test for this using various print statements in your code.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thanks for the response. I spoke too soon, t's now happening occasionally other charts as well (2 separate charts today, once each over about 7 hours).

      It's a new error, and the indicator hasn't been changed, so I'm not sure it's repeatable- but I'll try to output anything that might be creatiing a bar -1 error.

      But still, if that's the case, I would think my error trapping should prevent the indicator from vanishing, as it does in case of other errors.

      I have run a memory check, since the message refers to possible problems, but it didn't find anything.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NM_eFe, Today, 06:14 AM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by EB Worx, 03-07-2023, 05:05 AM
      5 responses
      104 views
      1 like
      Last Post NinjaTrader_BrandonH  
      Started by PaulMohn, Today, 02:06 AM
      2 responses
      11 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by burtoninlondon, 04-28-2024, 12:38 AM
      2 responses
      22 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by ETFVoyageur, Today, 02:04 PM
      0 responses
      3 views
      0 likes
      Last Post ETFVoyageur  
      Working...
      X