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
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.