OPEN-SOURCE SCRIPT
WSMR v3.8 — WhaleSplash → Mean Reversal

# WSMR v3.8 — WhaleSplash → Mean Reversal
### Global, Anchored, Non-Repainting Signal Framework for Futures, Crypto & Index Markets
**WSMR v3.8** is a volatility-anchored market-structure framework designed to detect two high-probability turning points:
## 1️⃣ WhaleSplash (WS) — Short Impulse Exhaustion
A “WhaleSplash” is a large downside impulse characterised by:
- bar range ≥ *k × ATR*
- strong % move
- volume expansion vs SMA(20)
- deep Z-Score oversold
- compression away from VWAP
- RSI weakness
When these conditions align, the indicator marks a short exhaustion event and prints a 🐋 icon below the bar. This is a **non-repainting bar-close confirmation**.
---
## 2️⃣ Mean Reversal (MR) — Bullish Reversal Setup
The MR module combines:
- RSI bullish divergence (pivot-based, safe)
- Z-Score reset above threshold
- SMA20 reclaim with positive slope
- Higher-low structure
When confirmed at bar-close, the indicator identifies conditions favourable for a **mean-reversion long**.
MR signals can optionally trigger an “**1st green candle after MR**” confirmation within a user-defined TTL (default 12 bars).
---
# 🎯 Key Features
### ✔ Non-Repainting Confirmed Signals
WS & MR only fire **after** bar close, using cooldown logic to avoid clustering and noise.
### ✔ VWAP-Anchored Z-Score Framework
All signals reference price distance and statistical deviation from VWAP, producing adaptive, volatility-aware setups.
### ✔ Session Filter (Asia-Optimised)
Optional session gating allows signals only between **23:00–09:00 UTC**, ideal for systematic Asia-session breakout & mean-reversion traders.
### ✔ Volatility Monitor (Normal → Extreme)
Dynamic volatility classification using:
- ATR baseline ratio
- wickiness index
- range Z-Score
States: **Normal → Wicky → Spiky → Extreme**
Displayed with colour-coded background in the status panel.
### ✔ Rolling WhaleSplash Frequency (Analytics Panel)
WSMR tracks the frequency of WhaleSplash events over a rolling window (Bars/Days/Weeks/Months) and estimates average WS/day (on minute timeframes).
### ✔ Status Panel (Bottom-Right)
Live display of:
- Mode (Global/Asia)
- Timeframe + TTL status
- WhaleSplash frequency
- Volatility state
- ATR/Range information
---
# 📌 Best Timeframes
Optimised and validated on **5-minute charts**, but compatible with all intraday timeframes.
---
# 🚨 Alerts Included
- WhaleSplash SHORT
- WhaleSplash LONG
- Volatility Warning (Spiky/Extreme)
---
# ⚠️ Notes
WSMR v3.8 is not a buy/sell system. It is a **signal framework** highlighting exhaustion and reversal conditions. Always combine with market structure, session context, and risk management. Past performance does not guarantee future results.
---
# 💬 Credits
Script created by **John Nolan (JohnFrancisNolan)**
Pine Script® v6
© 2024–2025 — Published under the **Mozilla Public License 2.0**
### Global, Anchored, Non-Repainting Signal Framework for Futures, Crypto & Index Markets
**WSMR v3.8** is a volatility-anchored market-structure framework designed to detect two high-probability turning points:
## 1️⃣ WhaleSplash (WS) — Short Impulse Exhaustion
A “WhaleSplash” is a large downside impulse characterised by:
- bar range ≥ *k × ATR*
- strong % move
- volume expansion vs SMA(20)
- deep Z-Score oversold
- compression away from VWAP
- RSI weakness
When these conditions align, the indicator marks a short exhaustion event and prints a 🐋 icon below the bar. This is a **non-repainting bar-close confirmation**.
---
## 2️⃣ Mean Reversal (MR) — Bullish Reversal Setup
The MR module combines:
- RSI bullish divergence (pivot-based, safe)
- Z-Score reset above threshold
- SMA20 reclaim with positive slope
- Higher-low structure
When confirmed at bar-close, the indicator identifies conditions favourable for a **mean-reversion long**.
MR signals can optionally trigger an “**1st green candle after MR**” confirmation within a user-defined TTL (default 12 bars).
---
# 🎯 Key Features
### ✔ Non-Repainting Confirmed Signals
WS & MR only fire **after** bar close, using cooldown logic to avoid clustering and noise.
### ✔ VWAP-Anchored Z-Score Framework
All signals reference price distance and statistical deviation from VWAP, producing adaptive, volatility-aware setups.
### ✔ Session Filter (Asia-Optimised)
Optional session gating allows signals only between **23:00–09:00 UTC**, ideal for systematic Asia-session breakout & mean-reversion traders.
### ✔ Volatility Monitor (Normal → Extreme)
Dynamic volatility classification using:
- ATR baseline ratio
- wickiness index
- range Z-Score
States: **Normal → Wicky → Spiky → Extreme**
Displayed with colour-coded background in the status panel.
### ✔ Rolling WhaleSplash Frequency (Analytics Panel)
WSMR tracks the frequency of WhaleSplash events over a rolling window (Bars/Days/Weeks/Months) and estimates average WS/day (on minute timeframes).
### ✔ Status Panel (Bottom-Right)
Live display of:
- Mode (Global/Asia)
- Timeframe + TTL status
- WhaleSplash frequency
- Volatility state
- ATR/Range information
---
# 📌 Best Timeframes
Optimised and validated on **5-minute charts**, but compatible with all intraday timeframes.
---
# 🚨 Alerts Included
- WhaleSplash SHORT
- WhaleSplash LONG
- Volatility Warning (Spiky/Extreme)
---
# ⚠️ Notes
WSMR v3.8 is not a buy/sell system. It is a **signal framework** highlighting exhaustion and reversal conditions. Always combine with market structure, session context, and risk management. Past performance does not guarantee future results.
---
# 💬 Credits
Script created by **John Nolan (JohnFrancisNolan)**
Pine Script® v6
© 2024–2025 — Published under the **Mozilla Public License 2.0**
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.