📊 TECHNICAL
RSI Divergence
An automatic overlay that detects when price and RSI disagree at swing highs/lows, flagging classic bullish and bearish divergence setups directly on the chart.
610KUses
26900Likes
0Comments
Live Demo — RSI Divergence applied to NIFTY 50 (illustrative)
PriceEMA(9)EMA(21)SMA(20)
What is RSI Divergence?
Built on Wilder's RSI, this pattern warns when price makes a new swing high/low but momentum fails to confirm it. This tool automates detection by tracking RSI pivots alongside price pivots and drawing the divergence lines and labels for you.
Formula
Bearish Divergence: Price Higher High AND RSI Lower High
Bullish Divergence: Price Lower Low AND RSI Higher LowParameters
| Parameter | Default | Description |
|---|---|---|
| RSI Period | 14 | Lookback for the underlying RSI |
| Pivot Lookback | 5 | Bars on each side required to confirm a swing pivot |
| Min Bars Between Pivots | 5 | Minimum spacing enforced between compared pivots |
Signal Interpretation
- Regular bearish divergence warns upside momentum is weakening and a top may be forming.
- Regular bullish divergence warns downside momentum is weakening and a bottom may be forming.
- Divergences near RSI's overbought/oversold zones are more significant than near the midline.
- A divergence that fails to be followed by reversal is common — it's a warning, not a guarantee.
- Multiple consecutive divergences (triple divergence) indicate a higher-probability reversal setup.
Tips & Best Practices
- Treat as an early warning to tighten stops; wait for confirming price action before entering.
- Most reliable at the end of extended trends; noisier in choppy markets.
- Increase pivot lookback on noisy intraday charts to reduce false flags.
