Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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:	86
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.
      Emily C.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Jonafare, 12-06-2012, 03:48 PM
      5 responses
      3,984 views
      0 likes
      Last Post rene69851  
      Started by Fitspressorest, Today, 01:38 PM
      0 responses
      2 views
      0 likes
      Last Post Fitspressorest  
      Started by Jonker, Today, 01:19 PM
      0 responses
      2 views
      0 likes
      Last Post Jonker
      by Jonker
       
      Started by futtrader, Today, 01:16 PM
      0 responses
      6 views
      0 likes
      Last Post futtrader  
      Started by Segwin, 05-07-2018, 02:15 PM
      14 responses
      1,791 views
      0 likes
      Last Post aligator  
      Working...
      X