Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Calling RSI within OnRender when it's already been loaded as a plot

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

    Calling RSI within OnRender when it's already been loaded as a plot

    Hi,

    I call an RSI in else if (State == State.DataLoaded)
    {
    RSI1 = RSI(Close, 14, 3);

    how do I call the result for a specific bar number in OnRender.

    I've tried


    RSI1[0] - didn't work.

    int CurrentBarFromZero = BarsArray[0].Count - ChartBars.ToIndex;

    (Input as RSI1).Values[0].GetValueAt(CurrentBarFromZero);

    Didn't work

    RSI1.GetValueAt(3);

    Didn't work.

    Any help would be appreciated. Thanks!


    #2
    Hello davydhnz,

    Print(RSI1.GetValueAt(CurrentBar)); // this would get the value of the RSI on the current bar.

    Print(RSI1.GetValueAt(CurrentBar - 1)); // this would get the value of the RSI on the previous bar.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    224 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    142 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    157 views
    1 like
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    237 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    196 views
    0 likes
    Last Post CarlTrading  
    Working...
    X