OPEN-SOURCE SCRIPT
Market Exhaustion [WavesUnchained]

Market Exhaustion [WavesUnchained]
Multi-oscillator exhaustion detector combining MFI + optional CCI, HTF bias, StochRSI timing, and a divergence engine with an Exhaustion Score (0-100).
CORE CONCEPT
- Detects exhaustion via regular divergences anchored on price pivots
- Scores each divergence (0-100) using 5 components
- Line width = quality, color = direction (never thicker than main line)
OSCILLATOR MODES
- MFI: Engine uses MFI only
- CCI: Engine uses CCI mapped to 0-100
- MFI+CCI: Both plotted, engine source selectable (MFI or CCI)
EXHAUSTION SCORE (0-100)
1. Sequence (Div 1/2/3...) - repeated attempts increase score
2. Fatigue - no new oscillator extreme over lookback
3. Formation Time - bars between pivots
4. Reaction - post-divergence bounce/drop vs ATR
5. Impulse - MFI/CCI delta + swing size
DIVERGENCE ENGINE
- Price-pivot anchored (LL/HH) with osc confirmation (HL/LH)
- OS/OB gating with dynamic zones + fallback to 20/80
- Tolerant direction checks (price + osc eps)
- Auto cleanup (max objects)
HTF CONTEXT
- Auto-HTF MFI bias label
- Optional HTF filter for signals
- Bias bonus (optional) for Exhaustion Score
SIGNALS & TIMING
- StochRSI timing + MFI zone confirmation
- Context + timing signals (L/S markers)
- Zone confirm bars
VISUALIZATION
- Color-coded MFI line (OB/OS/neutral)
- Optional CCI (mapped 0-100) line
- Divergence line width = quality, endpoint markers
- Optional mid-label with score
- Dynamic zones + optional fill
BEST USE CASES
- Reversal scouting at extremes
- Filtering weak swings
- 15M-4H swing exhaustion reads
- HTF bias + divergence confluence
Version: 1.0.0
Author: WavesUnchained
Pine Script: v6
Multi-oscillator exhaustion detector combining MFI + optional CCI, HTF bias, StochRSI timing, and a divergence engine with an Exhaustion Score (0-100).
CORE CONCEPT
- Detects exhaustion via regular divergences anchored on price pivots
- Scores each divergence (0-100) using 5 components
- Line width = quality, color = direction (never thicker than main line)
OSCILLATOR MODES
- MFI: Engine uses MFI only
- CCI: Engine uses CCI mapped to 0-100
- MFI+CCI: Both plotted, engine source selectable (MFI or CCI)
EXHAUSTION SCORE (0-100)
1. Sequence (Div 1/2/3...) - repeated attempts increase score
2. Fatigue - no new oscillator extreme over lookback
3. Formation Time - bars between pivots
4. Reaction - post-divergence bounce/drop vs ATR
5. Impulse - MFI/CCI delta + swing size
DIVERGENCE ENGINE
- Price-pivot anchored (LL/HH) with osc confirmation (HL/LH)
- OS/OB gating with dynamic zones + fallback to 20/80
- Tolerant direction checks (price + osc eps)
- Auto cleanup (max objects)
HTF CONTEXT
- Auto-HTF MFI bias label
- Optional HTF filter for signals
- Bias bonus (optional) for Exhaustion Score
SIGNALS & TIMING
- StochRSI timing + MFI zone confirmation
- Context + timing signals (L/S markers)
- Zone confirm bars
VISUALIZATION
- Color-coded MFI line (OB/OS/neutral)
- Optional CCI (mapped 0-100) line
- Divergence line width = quality, endpoint markers
- Optional mid-label with score
- Dynamic zones + optional fill
BEST USE CASES
- Reversal scouting at extremes
- Filtering weak swings
- 15M-4H swing exhaustion reads
- HTF bias + divergence confluence
Version: 1.0.0
Author: WavesUnchained
Pine Script: v6
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.