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 guillembm, Today, 12:37 AM
      3 responses
      11 views
      0 likes
      Last Post NinjaTrader_ChrisSch  
      Started by percy3687, Yesterday, 07:45 PM
      1 response
      18 views
      0 likes
      Last Post NinjaTrader_Jason  
      Started by WHICKED, Yesterday, 08:24 PM
      0 responses
      18 views
      0 likes
      Last Post WHICKED
      by WHICKED
       
      Started by trader3000a, Yesterday, 05:32 PM
      0 responses
      8 views
      0 likes
      Last Post trader3000a  
      Started by obwon1, Yesterday, 02:16 PM
      2 responses
      12 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Working...
      X