OPEN-SOURCE SCRIPT

RSI Divergence Scanner by zdmre

Updated
Divergence is when the price of an asset is moving in the opposite direction of a technical indicator, such as an oscillator, or is moving contrary to other data. Divergence warns that the current price trend may be weakening, and in some cases may lead to the price changing direction.

If the stock is rising and making new highs, ideally the RSI is reaching new highs as well. If the stock is making new highs, but the RSI starts making lower highs, this warns the price uptrend may be weakening. This is negative divergence.
Positive divergence is the opposite situation. Imagine the price of a stock is making new lows while the RSI makes higher lows with each swing in the stock price. Investors may conclude that the lower lows in the stock price are losing their downward momentum and a trend reversal may soon follow.

Divergence is one of the common uses of many technical indicators, primarily the oscillators.

Use it at your own risk
Release Notes
Bug fixes and other visual improvements.
Release Notes
Added alerts for divergences.
barcolorLinear RegressionRelative Strength Index (RSI)rsidivergencetrendZigzagZig Zag Indicator

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?


Also on:

Disclaimer