Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to find divergence?

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

    How to find divergence?

    I'm looking for RSI divergence vs price (ie price hits new lows, whilst RSI is no longer making lows), how can I do this without having to spell out how many bars ago it was?

    This can be found any amount of bars away from the low price.
    Perhaps finding the lowest price and RSI and comparing if they're at the same time? I see isRising/isFalling is just for past 1 bar...

    #2
    Hello d122y,

    You can save information to variables or a custom series..

    What are the exact rules you want?

    If the Close[0] price is equal to the current day low and the rsi is not equal to the current day low?

    You can save the price value to a double variable.
    You can save the bar number when the condition is true to a int variable.

    Below I am providing a link to a forum post with helpful information about getting started with C# and NinjaScript.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    47 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    23 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    33 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Working...
    X