OPEN-SOURCE SCRIPT
MSO - Market Stress Oscillator [WavesUnchained]

MSO - Market Stress Oscillator [WavesUnchained]
Bidirectional stress oscillator built on WVF + Z-score, with JMA/ADX filters, regime bias, and validated follow-through. Designed to expose downside panic vs upside euphoria and measure whether the market accepts or rejects each stress event.
Quick Setup
- Stress Color Mode: Intuitive (Downside=green, Upside=red) or Technical (classic colors).
CORE CONCEPT
- Downside stress: price flushes below WVF baseline (panic)
- Upside stress: price stretches above WVF baseline (euphoria)
- Stress is normalized via Z-score for cross-asset/timeframe robustness
ENGINE (BI-WVF + Z-SCORE)
- WVF Long and Short computed separately (panic vs euphoria)
- Z-score window normalizes extremes
- Thresholds are TF-aware (15m / 1h / 4h / D / W / M)
QUALITY FILTERS
- JMA trend filter (slope-based, low-lag)
- ADX minimum for trend strength
- Min Extreme Duration to avoid 1-bar noise
- Cooldown to prevent signal clustering
ACCEPT / REJECT LOGIC
- Events are evaluated after reactBars (forward follow-through)
- Accepted: follow-through >= minFollowATR
- Rejected: follow-through < minFollowATR
- Scores (0..1) optionally plotted as acceptance strength
BIAS / REGIME CONTEXT
- Bias line: zL - zS (who dominates)
- Bias band: regime threshold (only meaningful outside band)
- HTF Wind: higher-timeframe bias flip (JMA smoothed)
- Clarity Label: regime entry aligned with HTF + absBias threshold
VISUALIZATION
- Stress Lines: Red = downside stress (panic), Green = upside stress (euphoria)
- Bias Line: zL - zS (who dominates). Neutral inside band, colored outside.
- Bias Band: regime threshold. Fill shows when bias is usable.
- Zones: boxes at peak events (history preserved, FIFO capped)
- Chart Labels: DA/DR/UA/UR (or LA/LR/SA/SR) at peaks
- Lines: reaction window + peak level lines (FIFO capped)
STRESS COLOR MODE
- Intuitive: Downside stress = green, Upside stress = red (opportunity mapping)
- Technical: Downside stress = red, Upside stress = green (classic convention)
- This setting is visual only; logic, bias, and signals are unchanged
HOW TO USE
1. Read the stress lines: red spikes = panic risk, green spikes = euphoria risk.
2. Check bias: outside the band = usable regime; inside = noise.
3. Use DA/DR/UA/UR:
- DA/UA = stress accepted (follow-through confirmed)
- DR/UR = stress rejected (weak follow-through)
4. Add HTF wind: prefer signals aligned with HTF bias.
5. Tune presets by TF; use manual TF override for testing.
PRESETS & UI
- Full TF preset table (15m / 1h / 4h / D / W / M)
- Manual TF override for testing
- Preset summary panel (optional)
LOGGING (CSV)
- Pivot and stress logs for validation
- Early/First-pivot classification options
- Label IDs included for chart-to-log tracing
BEST USE CASES
- Panic/euphoria detection with follow-through validation
- Regime-aware context (bias + HTF wind)
- Multi-timeframe stress mapping (15m to Weekly)
Version: 1.0.0
Author: WavesUnchained
Pine Script: v6
Educational use only. Test thoroughly before live trading.
Bidirectional stress oscillator built on WVF + Z-score, with JMA/ADX filters, regime bias, and validated follow-through. Designed to expose downside panic vs upside euphoria and measure whether the market accepts or rejects each stress event.
Quick Setup
- Stress Color Mode: Intuitive (Downside=green, Upside=red) or Technical (classic colors).
CORE CONCEPT
- Downside stress: price flushes below WVF baseline (panic)
- Upside stress: price stretches above WVF baseline (euphoria)
- Stress is normalized via Z-score for cross-asset/timeframe robustness
ENGINE (BI-WVF + Z-SCORE)
- WVF Long and Short computed separately (panic vs euphoria)
- Z-score window normalizes extremes
- Thresholds are TF-aware (15m / 1h / 4h / D / W / M)
QUALITY FILTERS
- JMA trend filter (slope-based, low-lag)
- ADX minimum for trend strength
- Min Extreme Duration to avoid 1-bar noise
- Cooldown to prevent signal clustering
ACCEPT / REJECT LOGIC
- Events are evaluated after reactBars (forward follow-through)
- Accepted: follow-through >= minFollowATR
- Rejected: follow-through < minFollowATR
- Scores (0..1) optionally plotted as acceptance strength
BIAS / REGIME CONTEXT
- Bias line: zL - zS (who dominates)
- Bias band: regime threshold (only meaningful outside band)
- HTF Wind: higher-timeframe bias flip (JMA smoothed)
- Clarity Label: regime entry aligned with HTF + absBias threshold
VISUALIZATION
- Stress Lines: Red = downside stress (panic), Green = upside stress (euphoria)
- Bias Line: zL - zS (who dominates). Neutral inside band, colored outside.
- Bias Band: regime threshold. Fill shows when bias is usable.
- Zones: boxes at peak events (history preserved, FIFO capped)
- Chart Labels: DA/DR/UA/UR (or LA/LR/SA/SR) at peaks
- Lines: reaction window + peak level lines (FIFO capped)
STRESS COLOR MODE
- Intuitive: Downside stress = green, Upside stress = red (opportunity mapping)
- Technical: Downside stress = red, Upside stress = green (classic convention)
- This setting is visual only; logic, bias, and signals are unchanged
HOW TO USE
1. Read the stress lines: red spikes = panic risk, green spikes = euphoria risk.
2. Check bias: outside the band = usable regime; inside = noise.
3. Use DA/DR/UA/UR:
- DA/UA = stress accepted (follow-through confirmed)
- DR/UR = stress rejected (weak follow-through)
4. Add HTF wind: prefer signals aligned with HTF bias.
5. Tune presets by TF; use manual TF override for testing.
PRESETS & UI
- Full TF preset table (15m / 1h / 4h / D / W / M)
- Manual TF override for testing
- Preset summary panel (optional)
LOGGING (CSV)
- Pivot and stress logs for validation
- Early/First-pivot classification options
- Label IDs included for chart-to-log tracing
BEST USE CASES
- Panic/euphoria detection with follow-through validation
- Regime-aware context (bias + HTF wind)
- Multi-timeframe stress mapping (15m to Weekly)
Version: 1.0.0
Author: WavesUnchained
Pine Script: v6
Educational use only. Test thoroughly before live trading.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.