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**
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que la republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no pretenden ser, ni constituyen, asesoramiento o recomendaciones financieras, de inversión, de trading o de otro tipo proporcionadas o respaldadas por TradingView. Más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que la republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no pretenden ser, ni constituyen, asesoramiento o recomendaciones financieras, de inversión, de trading o de otro tipo proporcionadas o respaldadas por TradingView. Más información en Condiciones de uso.