OPEN-SOURCE SCRIPT

RSI Trending with Divergences

This script uses the RSI and RSI divergences to mark signals where the rsi is both below/above the 50, below/above its moving average, and where the last regular or hidden divergence matches that state. The RSI is built into the indicator, so you don't need it in your bottom pane if you don't want it, I just put one there for illustrative purposes. Please note it will not print the same signal consecutively, as it is meant to show an overall direction, not the in and out fluctuations. I suggest using it in conjunction with some moving averages so you can ignore signals not in the trend.
Relative Strength Index (RSI)rsi_divergencetrend

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 publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer