INVITE-ONLY SCRIPT
Smart Divergence Engine [ChartNation]

What this does
Smart Divergence Engine is an RSI-based analysis panel that helps you spot momentum exhaustion and structure-backed reversals. It blends four concepts into one workflow:
This script is designed to be a clear decision aid, not a mashup for its own sake—the components work together to qualify divergences with volatility context and proper swing confirmation.
How it works?
Why this is useful
Divergences alone can be noisy. By waiting for swing confirmation and adding a volatility-aware re-entry filter, the panel focuses attention on exhaustion areas that align with structure—reducing false positives during choppy conditions.
The gradient “beauty mode” improves readability of RSI regimes around the 50 midline without cluttering the pane.
Inputs (key settings)
Shark Fin controls:
Visuals
Alerts
Configure alerts on any chart/timeframe using these built-in conditions:
Notes & limitations
Divergences and labels only appear after a swing completes (after Pivot Right bars). This keeps signals tied to confirmed structure.
This panel operates in oscillator space (overlay=false). If you prefer price-chart markers/lines, use the companion overlay version built on the same logic.
Smart Divergence Engine is an RSI-based analysis panel that helps you spot momentum exhaustion and structure-backed reversals. It blends four concepts into one workflow:
- a smoothed RSI “price line,”
- volatility bands around that RSI,
- a “Shark Fin” re-entry filter that highlights stretched moves snapping back inside the bands, and
- pivot-confirmed RSI divergences (bullish/bearish) rendered cleanly on the panel with optional glow.
This script is designed to be a clear decision aid, not a mashup for its own sake—the components work together to qualify divergences with volatility context and proper swing confirmation.
How it works?
- RSI engine. The script computes RSI on your chosen source, then applies a light RMA smoothing to form the “price line.”
- Volatility bands. A 34-period SMA of the RSI creates a basis; standard deviation bands are projected using a configurable multiplier (default 1.618). The dotted 50 line anchors bias.
- Shark Fin (exhaustion cue). When RSI stretches beyond the outer band by a small buffer and then re-enters the band with slope confirmation and a minimum stdev (volatility) condition, the script fills the gap between RSI and the violated band (20% style by default). A cooldown avoids back-to-back signals.
- Confirmed divergences. Swing points are detected using Pivot Left/Right. When a new pivot confirms (i.e., after Pivot Right bars), the script compares price vs RSI at the pivot bar (rsi[pivotR]).
- Bullish divergence: price makes a lower low while RSI makes a higher low.
- Bearish divergence: price makes a higher high while RSI makes a lower high.
- Confirmed events are drawn as lines between the last two pivots with compact labels (“Bull” / “Bear”). Once printed, they do not update historically.
Why this is useful
Divergences alone can be noisy. By waiting for swing confirmation and adding a volatility-aware re-entry filter, the panel focuses attention on exhaustion areas that align with structure—reducing false positives during choppy conditions.
The gradient “beauty mode” improves readability of RSI regimes around the 50 midline without cluttering the pane.
Inputs (key settings)
- RSI Length (default 14) – momentum window.
- Volatility Band Length (34) and Band Multiplier (1.618) – widen/narrow band sensitivity.
- Overbought / Oversold (68/32) – horizontal guides and internal offsets for labels.
- Pivot Left / Pivot Right (default 10/10) – swing definition; divergence is evaluated at the pivot bar (rsi[pivotR]).
Shark Fin controls:
- Fin depth buffer (RSI pts) – how far beyond the band counts as “stretched.”
- Min band stdev – volatility threshold to qualify fins.
- Min bars between fins – cooldown.
- Style / Beauty Mode: optional gradient fill above/below 50, divergence line glow and widths, top/bottom colors, and opacity.
Visuals
- RSI line (thin, smoothed), upper/lower bands, 50 midline (dotted).
- Shark Fin shows only as a soft fill while forming; confirmations are alertable.
- Divergences draw compact lines + tiny dot + “Bull/Bear” labels on the panel. Glow and widths are user-tunable.
Alerts
Configure alerts on any chart/timeframe using these built-in conditions:
- “RSI Shark Fin — Bullish” – RSI re-entered from below the lower band (with slope + stdev + cooldown).
- “RSI Shark Fin — Bearish” – RSI re-entered from above the upper band (with slope + stdev + cooldown).
- “Bullish Divergence (Panel)” – pivot-confirmed bullish divergence.
- “Bearish Divergence (Panel)” – pivot-confirmed bearish divergence.
- How to use (practical playbook)
- Confluence first. Divergences are stronger when Shark Fin confirms exhaustion and RSI is transitioning around the 50 midline.
- Trend context. In strong trends, counter-trend divergences can fail; consider waiting for RSI to re-enter the band or reclaim/loss the 50 line.
- Risk management. Treat signals as context, not entries on their own—pair with price action (structure, S/R, candles) and a predefined stop/size plan.
Notes & limitations
Divergences and labels only appear after a swing completes (after Pivot Right bars). This keeps signals tied to confirmed structure.
This panel operates in oscillator space (overlay=false). If you prefer price-chart markers/lines, use the companion overlay version built on the same logic.
僅限邀請腳本
只有經作者批准的使用者才能訪問此腳本。您需要申請並獲得使用權限。該權限通常在付款後授予。如欲了解更多詳情,請依照以下作者的說明操作,或直接聯絡chartnation。
除非您完全信任其作者並了解腳本的工作原理,否則TradingView不建議您付費或使用腳本。您也可以在我們的社群腳本中找到免費的開源替代方案。
作者的說明
Please claim access to this indicator on Whop after subscribing to one of our plans at https://chartnation.net
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
僅限邀請腳本
只有經作者批准的使用者才能訪問此腳本。您需要申請並獲得使用權限。該權限通常在付款後授予。如欲了解更多詳情,請依照以下作者的說明操作,或直接聯絡chartnation。
除非您完全信任其作者並了解腳本的工作原理,否則TradingView不建議您付費或使用腳本。您也可以在我們的社群腳本中找到免費的開源替代方案。
作者的說明
Please claim access to this indicator on Whop after subscribing to one of our plans at https://chartnation.net
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。