Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Accessing Custom Series within OnRender

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

    Accessing Custom Series within OnRender

    Most of my tools rely upon setting a value for a Series on a bar by bar basis, and then accessing that Series within OnRender to draw it on the chart.

    I was away for a while. Came back to NT and installed the newest version of NT8, and now all of my indicators are broken.

    It seems that OnRender() is called in a such a way that I can only access Series values for the first bar on the chart.

    For instance, if within OnRender() I add:

    Print(High[0]);

    I will not see the high of the current bar on the chart, but the high of the first bar on the chart.

    #2
    Hello,
    In NinjaTrader 8 if you are needing the call the value of a DataSeries such as High outside of OnBarUpdate() you would need to use the Absolute Index which is called using .GetValueAt()
    To call High[0] inside OnRender() you would use High.GetValueAt(CurrentBar-1)

    For more information on .GetValueAt() please see the following link: http://ninjatrader.com/support/helpG...getvalueat.htm
    Cody B.NinjaTrader Customer Service

    Comment


      #3
      It's weird that my indicators used to work without using GetValueAt back on 8.0.0.10. I was able to fix those old NT8 indicators with a Find and Replace, though, so I'm ready for tomorrow morning.

      Thanks.

      Comment

      Latest Posts

      Collapse

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