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 NullPointStrategies, Today, 05:17 AM
    0 responses
    38 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    124 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    64 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    41 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X