genma01

Divergence Finder (RSI/Price) with Options

genma01 Updated   
Divergence finder used to find BUY or SELL Signal based on a divergence between Price and RSI (Price goes UP when RSI goes down / opposite )

You can configure the script with several Options :

Source for Price Buy Div : you can use the close price of the candle (by default) or use the high price of the candle for exemple.
Source for Price Sell Div : you can use the close price of the candle (by default) or use the low price of the candle for exemple.
Source for RSI Div : you can use the close price of the candle (by default) to calculate the RSI .

Theses settings allow you to set a minimum RSI level to reach to activate the Divergence finder (p1 is the first point in time, and p2 is the second one):
Min RSI for Sell divergence(p1) : this is the minimum RSI level to reach for the first of the 2 points of divergence (Default 70) for the SELL Signal
Min RSI for Sell divergence (p2) : this is the minimum RSI level to reach for the second of the 2 points of divergence (Default 60) for the SELL Signal
Max RSI for Buy divergence (p1) : this is the minimum RSI level to reach for the first of the 2 points of divergence (Default 30) for the BUY Signal
Max RSI for Buy divergence (p2) : this is the minimum RSI level to reach for the second of the 2 points of divergence (Default 40 ) for the BUY Signal

Theses settings allow you to set a minimum margin difference between our two points (p1 and p2) to validate the Divergence
Min margin between price for displaying divergence (%) : Set a minimum margin (in % of the price) before the indicator validate this divergence
Min margin between RSI for displaying divergence (%) : Set a minimum margin (in % of the RSI ) before the indicator validate this divergence

Display Divergence label : Choose to display the price of the candle, and the RSI when a divergence is found
Display tops/bottoms : Display where the tops and bottoms are calculated directly on the chart
Release Notes:
re-enabled MinMargin for Sell Divergence (was only used for buy divergence by mistake)
Release Notes:
clean the chart
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?