Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

retrieve indicator values

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

    retrieve indicator values

    Hi Ninjatraders

    I want to test if the RSI indicator is trending up or down during defined period in time. I know there are rising() and falling() methods available, but looks like they can only test on a day by day basis (check today vs tomorrow).
    So I believe what I need is to be able to retrieve indicator values x and y days ago to compare them.
    1. For example how do I retrieve RSI values 10 and 20 days ago?
    2. Also, please advise in case there's a smarter way of checking the direction of the trend within a period defined by x and y bars ago on the idicator data.


    Thanks a lot

    #2
    Hello,
    You can get the RSI values from X bars ago by using

    RSI(14, 3)[20];
    //in this example you would be using period of 14 and smooth value of 3 and getting the value from 20 bars ago


    If you wanted to you could always calculate the angle of the line at a given point


    Let me know if I can be of further assistance.
    LanceNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    37 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    18 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    25 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    40 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    34 views
    0 likes
    Last Post CarlTrading  
    Working...
    X