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 GwFutures1988, Today, 02:48 PM
      1 response
      5 views
      0 likes
      Last Post NinjaTrader_Clayton  
      Started by ScottWalsh, 04-16-2024, 04:29 PM
      6 responses
      32 views
      0 likes
      Last Post ScottWalsh  
      Started by frankthearm, Today, 09:08 AM
      10 responses
      36 views
      0 likes
      Last Post frankthearm  
      Started by mmenigma, Today, 02:22 PM
      1 response
      4 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by NRITV, Today, 01:15 PM
      2 responses
      10 views
      0 likes
      Last Post NRITV
      by NRITV
       
      Working...
      X