RSI Divergence¶
Indicators · Oscillators
RSI with confirmed-pivot regular bullish/bearish divergence signals.
This block does what most traders eyeball by hand: it watches RSI and price for divergence — when they disagree about a trend's strength — and fires a signal only when a divergence is confirmed by a completed pivot. Bullish divergence (price makes a lower low while RSI makes a higher low) warns a downtrend is losing steam; bearish divergence (price higher high, RSI lower high) warns an uptrend is. It automates one of the highest-quality reversal patterns in technical analysis.
How it works¶
The block computes RSI over the RSI period (default 14) and tracks swing pivots in both price and RSI using a Pivot lookback (default 5) — meaning a pivot is only confirmed once that many bars have printed on each side of it. When two consecutive confirmed pivots show price and RSI moving in opposite directions, it emits Bull ↑ or Bear ↓ (drawn as arrows). It also exposes the raw RSI line plus standard OB/OS signals at the Overbought (70) / Oversold (30) thresholds.
The critical detail: the Pivot lookback is a confirmation lag. With a lookback of 5, the signal can only appear 5 bars after the pivot actually formed — that's the price of confirmation, and it means these signals are honest (no peeking at future bars) but never catch the exact low or high.
When to use it¶
Use confirmed RSI divergence as a reversal / exhaustion signal, ideally at the end of an extended move and at a meaningful level (support/resistance, a Supply/Demand Zone). It's a counter-trend tool, so it pairs best with a structure or level filter rather than being traded blind — divergence can persist for a long time in a strong trend before price actually turns.
Example¶
Reversal at a level: wire bars into RSI Divergence and combine Bull ↑ with price tapping a Supply/Demand Zone through an And gate into a Buy Signal. Place the Fixed Stop-Loss below the divergence's pivot low and aim for a Reward-to-Risk Target of 2×. Backtest in the Tester.
Tips & gotchas¶
- The pivot lookback is a real delay. Bigger lookback = more reliable pivots but later signals — and no lookahead, so backtests are honest.
- Divergence ≠ immediate reversal. It can repeat several times in a strong trend; use a level or structure filter and a stop.
- Best at extremes and key levels, not in the middle of a range.
- It's a confirmer of exhaustion, not a trend tool — don't use it to chase momentum.
Related blocks¶
Inputs¶
| Socket | Type | What to wire in |
|---|---|---|
| Bars | bars |
Price bars |
Outputs¶
| Output | Type | Plots as | Description |
|---|---|---|---|
| RSI | series |
Line · sub-pane | RSI value |
| Bull ÷ | signal |
Signal arrows | Bullish divergence confirmed (price LL, RSI HL) |
| Bear ÷ | signal |
Signal arrows | Bearish divergence confirmed (price HH, RSI LH) |
| OB | signal |
— | RSI above the overbought threshold |
| OS | signal |
— | RSI below the oversold threshold |
Parameters¶
| Parameter | Type | Default | What it does |
|---|---|---|---|
| RSI period | number · 2–100 | 14 |
|
| Pivot lookback | number · 1–50 | 5 |
Symmetric bars each side of a pivot (= confirmation lag) |
| Overbought | number · 50.0–100.0 | 70.0 |
|
| Oversold | number · 0.0–50.0 | 30.0 |
|
| Line color | colour | #ab47bc |
Chart guides
This indicator draws reference level(s): overbought, oversold.
Reference auto-generated from the block catalog · category Indicators.