Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Series drawing on wrong bar

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

    Series drawing on wrong bar

    When setting the AddPlot value from the OnBarUpdate, it looks like the AddPlot Series is always 1 bar behind (see the black circles). I am calling my own custom OnRender function in the indicator is using OnMarketDepth to update the current Series​ open, high, low close for the calculated values. You can see the values updating in real time and the black label on the right shows 23 which is the correct current value, but the black dot is the 2nd to last bar instead of the last bar. How do I fix this?

    Setting the Calculate value to OnEachTick causes the OnRender function to not show the last bar on the chart when calling the series.GetValueAt(index) function
    Click image for larger version

Name:	image.png
Views:	129
Size:	550.2 KB
ID:	1237210

    #2
    nm...it seems like I should be setting Calculate = OnEachTick and then fix the render X position to alleviate the issue

    Comment


      #3
      Originally posted by habibalex View Post
      nm...it seems like I should be setting Calculate = OnEachTick and then fix the render X position to alleviate the issue
      Hello habibalex,

      Thank you for your note.

      I am glad to hear you have resolved this item. Please don't hesitate to reach out in the future with any other NinjaTrader items we may assist you with.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      571 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      330 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      548 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      548 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X