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 MarianApalaghiei, Today, 10:49 PM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by love2code2trade, Yesterday, 01:45 PM
      4 responses
      28 views
      0 likes
      Last Post love2code2trade  
      Started by funk10101, Today, 09:43 PM
      0 responses
      8 views
      0 likes
      Last Post funk10101  
      Started by pkefal, 04-11-2024, 07:39 AM
      11 responses
      37 views
      0 likes
      Last Post jeronymite  
      Started by bill2023, Yesterday, 08:51 AM
      8 responses
      46 views
      0 likes
      Last Post bill2023  
      Working...
      X