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**
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。