OPEN-SOURCE SCRIPT
RSI Divergence Hunter [JOAT]

RSI Divergence Hunter [JOAT]
Automatically detects the four classic RSI divergence types on confirmed pivots and frames each one as a trade.

What it is
Divergence between price and momentum is one of the oldest reversal and continuation reads, but marking it by hand is subjective and easy to force. This indicator detects all four divergence types algorithmically on confirmed pivots, so what you see is defined and repeatable, and then attaches a full trade structure to each. It is an original divergence engine, not a plain RSI plot.
How it works
• RSI core — the relative strength index measures the speed and size of recent moves. It is the momentum reference every divergence is measured against.
• Confirmed pivots — the engine waits for pivots on both price and RSI to confirm a set number of bars back before comparing them. Because pivots are only evaluated once confirmed, a plotted divergence does not repaint into or out of existence.
• The four types — regular bullish (price lower low, RSI higher low) and regular bearish (price higher high, RSI lower high) point to potential reversals; hidden bullish and hidden bearish point to trend continuation after a pullback. Each is drawn with a connecting line on both price and RSI and labelled by type.
• Zones and gating — overbought and oversold zones give context, and a minimum-gap control keeps divergence signals from stacking on lower timeframes.
Trade levels
Each qualifying divergence draws a red risk box to the stop and a green reward box to the third target, with inner dividers and right-edge labels for entry, stop and each take-profit at your R multiples. The stop is anchored beyond the pivot that formed the divergence.
The dashboard
An adjustable divergence-scope panel shows the current RSI value and zone, the most recent divergence type detected, the active signal, a conviction estimate, and a live first-target-before-stop tally from closed bars only.
How to use it
• Works on any asset and timeframe.
• Treat regular divergences as counter-trend reversal cues and hidden divergences as with-trend continuation cues — the distinction matters.
• Combine with structure or a trend filter; divergence works well as confluence, not in isolation.
Settings
RSI length and source, pivot strength, which divergence types to display, overbought/oversold levels, risk multiple and target R multiples, plus visual and dashboard controls.
Originality and usefulness
The contribution is a complete, confirmed-pivot detector for all four divergence classes with clear per-type labelling and integrated, non-repainting trade framing. By fixing the definition of a divergence and waiting for pivot confirmation, it removes much of the hindsight bias that makes manual divergence unreliable.

Notes and limitations
• Divergence signals can persist and reappear in strong trends; a divergence is a condition, not a timing guarantee.
• Confirmed pivots introduce a natural delay equal to the pivot strength — this is the cost of not repainting.
• The tally reflects only past bars on the current chart and is not a forecast.
• Educational and analytical tool, not financial advice.
— made with passion by officialjackofalltrades
Automatically detects the four classic RSI divergence types on confirmed pivots and frames each one as a trade.
What it is
Divergence between price and momentum is one of the oldest reversal and continuation reads, but marking it by hand is subjective and easy to force. This indicator detects all four divergence types algorithmically on confirmed pivots, so what you see is defined and repeatable, and then attaches a full trade structure to each. It is an original divergence engine, not a plain RSI plot.
How it works
• RSI core — the relative strength index measures the speed and size of recent moves. It is the momentum reference every divergence is measured against.
• Confirmed pivots — the engine waits for pivots on both price and RSI to confirm a set number of bars back before comparing them. Because pivots are only evaluated once confirmed, a plotted divergence does not repaint into or out of existence.
• The four types — regular bullish (price lower low, RSI higher low) and regular bearish (price higher high, RSI lower high) point to potential reversals; hidden bullish and hidden bearish point to trend continuation after a pullback. Each is drawn with a connecting line on both price and RSI and labelled by type.
• Zones and gating — overbought and oversold zones give context, and a minimum-gap control keeps divergence signals from stacking on lower timeframes.
Trade levels
Each qualifying divergence draws a red risk box to the stop and a green reward box to the third target, with inner dividers and right-edge labels for entry, stop and each take-profit at your R multiples. The stop is anchored beyond the pivot that formed the divergence.
The dashboard
An adjustable divergence-scope panel shows the current RSI value and zone, the most recent divergence type detected, the active signal, a conviction estimate, and a live first-target-before-stop tally from closed bars only.
How to use it
• Works on any asset and timeframe.
• Treat regular divergences as counter-trend reversal cues and hidden divergences as with-trend continuation cues — the distinction matters.
• Combine with structure or a trend filter; divergence works well as confluence, not in isolation.
Settings
RSI length and source, pivot strength, which divergence types to display, overbought/oversold levels, risk multiple and target R multiples, plus visual and dashboard controls.
Originality and usefulness
The contribution is a complete, confirmed-pivot detector for all four divergence classes with clear per-type labelling and integrated, non-repainting trade framing. By fixing the definition of a divergence and waiting for pivot confirmation, it removes much of the hindsight bias that makes manual divergence unreliable.
Notes and limitations
• Divergence signals can persist and reappear in strong trends; a divergence is a condition, not a timing guarantee.
• Confirmed pivots introduce a natural delay equal to the pivot strength — this is the cost of not repainting.
• The tally reflects only past bars on the current chart and is not a forecast.
• Educational and analytical tool, not financial advice.
— made with passion by officialjackofalltrades
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
The AI Trading Ecosystem, Built to win trades 📈
Get Full Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
Get Full Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
The AI Trading Ecosystem, Built to win trades 📈
Get Full Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
Get Full Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.