OPEN-SOURCE SCRIPT
已更新 RSI Sequential Exhaustion & Divergence

**RSI Sequential Exhaustion & Divergence — Multi-Factor Oscillator**
**What it is**
A single RSI-based reversal oscillator for spotting momentum exhaustion, then filtering and grading those signals so only the better-supported ones stand out. It is one integrated tool, not a pile of separate indicators sharing a pane.
**What it plots**
- The RSI line with a glow/gradient style coloured by momentum side, plus overbought/oversold/midline levels and an optional zone fill.
- Sequential Exhaustion signal arrows (▲/▼) at qualifying turns.
- Regular and hidden price–RSI divergence as lines and small labels, de-cluttered so the pane stays readable.
- A compact 5-row dashboard: Signal (direction · conviction % · age), RSI state, Confluence score, Context (trend/range + volatility state), and a Data-health read.
- An optional calibration panel and a set of hidden data-window outputs (EXP_*) for chaining into other scripts.
**Why these components are combined (and how they work together)**
Each part is here to fix a specific weakness of the part before it, so the result is one filtered, graded signal:
1. A bare RSI overbought/oversold reading whipsaws, and naive divergence over-fires. So the script uses two *structured* exhaustion cues instead: **Sequential Exhaustion** (the RSI makes three consecutive deeper pushes into an extreme zone and the fourth bar turns back out — a defined trigger, not just "RSI is low"), and a **divergence engine** that adds an independent reversal cue and is de-cluttered with a cooldown plus a minimum-gap filter.
2. Both cues are counter-trend by nature, and counter-trend entries fail in two situations: strong directional trends, and volatility cascades. To handle the first, an **HTF trend-bias filter** and an **ADX regime filter** suppress signals when a higher timeframe or strong ADX says the trend is intact. To handle the second, a **volatility-cluster filter** (a self-exciting intensity built from returns) proportionally raises the bar for new signals exactly when clustering makes mean-reversion most dangerous — and because it is price-only, it also works on volume-less symbols.
3. To tell which surviving signals are worth more, a **Confluence grade (0–5)** fuses five reasonably-independent reads of the same bar (HTF bias, ranging regime, a recent divergence, volume, and the RSI momentum turn). **Multi-timeframe agreement (3×/5×/15×)** is deliberately kept *separate* and applied as a conviction *multiplier* rather than blended into the score, because it is the one genuinely independent check — full agreement boosts conviction, contradiction damps it.
4. To stay honest about whether any of this is working on your symbol, a **calibration tracker** logs every signal and, after a fixed horizon, records whether price actually followed through (a move of at least X·ATR in the signal's direction), reporting a measured *past* hit-rate by grade tier with a Wilson 95% confidence interval. A **data-integrity read** (bar range, HTF-feed freshness, volume reliability) surfaces an OK / DEGRADED / CRITICAL status so the tool never silently scores on bad data.
**What is original here**
The individual techniques — RSI, divergence, ADX, ATR, volume reads, self-exciting intensity, Wilson intervals — are publicly documented. The original work is the integration: a structured RSI-exhaustion trigger gated by a proportional volatility-cluster filter, graded by a confluence score that is scaled by independent higher-timeframe agreement, and continuously audited by a built-in self-calibration tracker that reports honest past follow-through by tier. Components were chosen so each covers a distinct weakness; redundant filters were left out to keep one clear signal.
**How to use**
1. Add it to a chart. Defaults suit intraday index/futures; direction works on any symbol, while the volume confluence factor needs real traded volume.
2. Take signals in the direction the context filters allow. Prefer a higher conviction % and stronger higher-timeframe agreement; treat low-grade cues as noise (raise "Min confluence to allow signal" to suppress them).
3. Respect the volatility-cluster warning — it marks regimes where mean-reversion is most likely to fail.
4. Use the optional calibration panel as a sanity check on the tool's own past signals, never as a forward prediction.
5. Spot vs futures: a cash/spot index has no real volume. "Volume Mode" auto-detects this, and you can borrow a traded-volume series from a related futures contract; the "Data" row shows the active mode.
**Notes**
All signals and divergence confirm on closed pivots and do not repaint. Divergence labels appear "Pivot Right" bars after the turn, which is inherent to honest pivot detection.
**Disclaimer**
For education and information only. This is not financial, investment, or trading advice and guarantees no outcome. Signals describe current and past conditions; they do not predict the future. The calibration figures describe past behaviour only — they are not a backtest or a probability of future results. Volume-based readings depend on the data feed and are unreliable on instruments without real volume. Trading carries substantial risk of loss; you are solely responsible for your own decisions and risk management. Consider consulting a licensed professional.
**What it is**
A single RSI-based reversal oscillator for spotting momentum exhaustion, then filtering and grading those signals so only the better-supported ones stand out. It is one integrated tool, not a pile of separate indicators sharing a pane.
**What it plots**
- The RSI line with a glow/gradient style coloured by momentum side, plus overbought/oversold/midline levels and an optional zone fill.
- Sequential Exhaustion signal arrows (▲/▼) at qualifying turns.
- Regular and hidden price–RSI divergence as lines and small labels, de-cluttered so the pane stays readable.
- A compact 5-row dashboard: Signal (direction · conviction % · age), RSI state, Confluence score, Context (trend/range + volatility state), and a Data-health read.
- An optional calibration panel and a set of hidden data-window outputs (EXP_*) for chaining into other scripts.
**Why these components are combined (and how they work together)**
Each part is here to fix a specific weakness of the part before it, so the result is one filtered, graded signal:
1. A bare RSI overbought/oversold reading whipsaws, and naive divergence over-fires. So the script uses two *structured* exhaustion cues instead: **Sequential Exhaustion** (the RSI makes three consecutive deeper pushes into an extreme zone and the fourth bar turns back out — a defined trigger, not just "RSI is low"), and a **divergence engine** that adds an independent reversal cue and is de-cluttered with a cooldown plus a minimum-gap filter.
2. Both cues are counter-trend by nature, and counter-trend entries fail in two situations: strong directional trends, and volatility cascades. To handle the first, an **HTF trend-bias filter** and an **ADX regime filter** suppress signals when a higher timeframe or strong ADX says the trend is intact. To handle the second, a **volatility-cluster filter** (a self-exciting intensity built from returns) proportionally raises the bar for new signals exactly when clustering makes mean-reversion most dangerous — and because it is price-only, it also works on volume-less symbols.
3. To tell which surviving signals are worth more, a **Confluence grade (0–5)** fuses five reasonably-independent reads of the same bar (HTF bias, ranging regime, a recent divergence, volume, and the RSI momentum turn). **Multi-timeframe agreement (3×/5×/15×)** is deliberately kept *separate* and applied as a conviction *multiplier* rather than blended into the score, because it is the one genuinely independent check — full agreement boosts conviction, contradiction damps it.
4. To stay honest about whether any of this is working on your symbol, a **calibration tracker** logs every signal and, after a fixed horizon, records whether price actually followed through (a move of at least X·ATR in the signal's direction), reporting a measured *past* hit-rate by grade tier with a Wilson 95% confidence interval. A **data-integrity read** (bar range, HTF-feed freshness, volume reliability) surfaces an OK / DEGRADED / CRITICAL status so the tool never silently scores on bad data.
**What is original here**
The individual techniques — RSI, divergence, ADX, ATR, volume reads, self-exciting intensity, Wilson intervals — are publicly documented. The original work is the integration: a structured RSI-exhaustion trigger gated by a proportional volatility-cluster filter, graded by a confluence score that is scaled by independent higher-timeframe agreement, and continuously audited by a built-in self-calibration tracker that reports honest past follow-through by tier. Components were chosen so each covers a distinct weakness; redundant filters were left out to keep one clear signal.
**How to use**
1. Add it to a chart. Defaults suit intraday index/futures; direction works on any symbol, while the volume confluence factor needs real traded volume.
2. Take signals in the direction the context filters allow. Prefer a higher conviction % and stronger higher-timeframe agreement; treat low-grade cues as noise (raise "Min confluence to allow signal" to suppress them).
3. Respect the volatility-cluster warning — it marks regimes where mean-reversion is most likely to fail.
4. Use the optional calibration panel as a sanity check on the tool's own past signals, never as a forward prediction.
5. Spot vs futures: a cash/spot index has no real volume. "Volume Mode" auto-detects this, and you can borrow a traded-volume series from a related futures contract; the "Data" row shows the active mode.
**Notes**
All signals and divergence confirm on closed pivots and do not repaint. Divergence labels appear "Pivot Right" bars after the turn, which is inherent to honest pivot detection.
**Disclaimer**
For education and information only. This is not financial, investment, or trading advice and guarantees no outcome. Signals describe current and past conditions; they do not predict the future. The calibration figures describe past behaviour only — they are not a backtest or a probability of future results. Volume-based readings depend on the data feed and are unreliable on instruments without real volume. Trading carries substantial risk of loss; you are solely responsible for your own decisions and risk management. Consider consulting a licensed professional.
發行說明
Just minor updates發行說明
minor update開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。