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**
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.