Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 maybeimnotrader, Yesterday, 05:46 PM
    2 responses
    21 views
    0 likes
    Last Post maybeimnotrader  
    Started by adeelshahzad, Today, 03:54 AM
    5 responses
    32 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by stafe, 04-15-2024, 08:34 PM
    7 responses
    32 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by merzo, 06-25-2023, 02:19 AM
    10 responses
    823 views
    1 like
    Last Post NinjaTrader_ChristopherJ  
    Started by frankthearm, Today, 09:08 AM
    5 responses
    22 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Working...
    X