Hawkes Self Exciting Volatility Cascade MT4
- Göstergeler
-
Anthony Cooke
Quantitative Systems Architect and C++, Python, MQL5, MQL4, and Pine Script developer specializing in non-repainting mathematical indicators, Expert Advisors, and statistical strategy audits. I combine industrial quality-control engineering and Applied Mathematics with multi-physics market modeling - Sürüm: 1.0
- Etkinleştirmeler: 5
Overview & Scientific Origin
The Hawkes Self Exciting Volatility Cascade is an institutional quantitative indicator engineered from Stochastic Point-Process Theory and High-Frequency Trading (HFT) Microstructure. Originally developed by statistician Alan Hawkes to model self-exciting earthquake chains and viral contagion, Hawkes Processes are widely deployed by institutional market makers and HFT desks to detect real-time order-book clustering—where a single aggressive institutional sweep triggers cascading stop-hunts, margin liquidations, and secondary algorithmic bursts. Built as a strictly causal, non-repainting volatility cascade detector, this indicator tracks live contagion intensity across Gold (XAUUSD), Silver (XAGUSD), Major Forex pairs, and US Indices.
Mathematical Mechanism & What It Does
Standard volatility indicators like ATR average out sudden bursts slowly and treat every bar as independent. In real markets, volatility is self-exciting—one violent shock dramatically raises the probability of another shock arriving moments later. This indicator models that chain reaction directly:
- Volatility Shock Detection (Excitation_Shock): Over a 55-bar rolling True Range baseline (InpPeriod = 55), the algorithm computes a live one-sided True Range Z-score. Whenever a candle exceeds InpEventThresh (1.50 standard deviations), it registers an institutional volatility shock and plots a bright DeepPink histogram pillar (bounded 0.0 to 6.0).
- Self-Exciting Convolution Kernel (Hawkes_Intensity): Each qualifying shock is assigned an excess magnitude mark and summed across a 55-bar causal memory window (InpKernelWindow = 55) using the Hawkes intensity law (λ(t) = μ + Σ α · m_k · e^(-β · Δt)).
- Live Contagion Curve: Each shock causes the continuous Cyan Hawkes_Intensity line to jump upward by gain InpAlpha (0.75) before exponentially decaying at rate InpBeta (0.25) back toward the calm baseline arrival rate InpBaseMu (0.20). When multiple shocks cluster rapidly, the jumps compound into a steep vertical cascade.
How to Trade With This Indicator
- Critical Cascade Regime (>= 2.50): When rapid DeepPink Excitation_Shock pillars push the Cyan Hawkes_Intensity curve above the 2.50 critical threshold (InpCriticalLevel), a self-reinforcing liquidity cascade or stop-hunt cluster is active. Breakout traders can ride expanding momentum, while mean-reversion traders and prop-firm EAs should pause entries until cascading stop-runs subside.
- Early Excitation Zone (1.0 to 2.5): Intensity rising above 1.0 shows volatility awakening from baseline equilibrium. Watch for a secondary DeepPink shock bar to confirm whether momentum builds into a full cascade.
- Calm Baseline Floor (< 1.0): When Hawkes_Intensity decays smoothly back below 1.0 toward 0.20, self-exciting turbulence has dissipated and normal range or pullback structures can be traded under calmer conditions.
Technical Specifications & Input Parameters
- Calculation Engine: 100% causal bar-by-bar execution with zero repainting, zero backpainting, and zero external DLL calls.
- InpPeriod (Default: 55) & InpKernelWindow (Default: 55): Rolling True Range baseline period and causal Hawkes exponential decay convolution window.
- InpEventThresh (Default: 1.50): Minimum True Range Z-score required to fire a DeepPink Excitation_Shock event.
- InpBaseMu (Default: 0.20), InpAlpha (Default: 0.75) & InpBeta (Default: 0.25): Core Hawkes parameters controlling calm baseline arrival rate, self-excitation jump gain, and exponential decay speed.
- InpCriticalLevel (Default: 2.50): Horizontal alert threshold flagging critical self-exciting cascade conditions.
- Prop-Firm & EA Ready: Clean 4-buffer layout (ExtEventBuffer, ExtLambdaBuffer, ExtMarkBuffer, ExtTRBuffer) built for seamless iCustom integration as a stop-hunt detector or drawdown-protection filter.
------Also Available for MetaTrader 4 (MT4): Running MT4 instead of MT5? The identically engineered MetaTrader 4 version of Hawkes Self Exciting Volatility Cascade is already published on my MQL5 Seller Profile with the exact same icon, parameters, and mathematical engine. Click my seller name to grab the MT4 edition.
