Variational Mode Lorenz Chaotic Attractor MT5
- 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.30
- Etkinleştirmeler: 5
Overview & Scientific Origin
The Variational Mode Lorenz Chaotic Attractor is a flagship institutional quantitative indicator engineered from Adaptive Signal Processing (Variational Mode Decomposition) and Nonlinear Chaos Dynamics (Edward Lorenz's 3D Strange Attractor). In aerospace telemetry, seismology, and biomedical engineering, Variational Mode Decomposition (VMD) is an advanced spectral optimization algorithm used to break a noisy, non-stationary signal into clean, non-overlapping frequency modes without distorting the live edge. In atmospheric physics and chaos theory, the Lorenz Strange Attractor models how dynamical systems stabilize inside one directional orbit ("wing")—or abruptly snap across the unstable central saddle point into the opposite wing during a regime shift.
Built from the ground up with 100% causal, non-repainting bar-by-bar execution, this flagship engine strips raw price into clean physical modes, propagates them through a live 3D Runge-Kutta (RK2) Lorenz ODE solver, and translates complex nonlinear math into an instantly readable subwindow display with reversal-locked confirmation dots and a live telemetry HUD—engineered for Gold (XAUUSD), Silver (XAGUSD), Major Forex pairs, JPY crosses, and US Indices.
Flagship Two-Stage Physics Engine (How It Works Under the Hood)
Standard retail oscillators average raw closing prices together, blending macro trend, swing cycles, and random tick noise into one lagging curve. This flagship architecture solves that problem in two strictly causal mathematical stages on every bar:
- Stage 1 — Causal Mirror-Extended DCT-II 3-Mode VMD (ADMM Solver): On each bar, the engine standardizes a rolling causal log-price window (InpVMDWindow = 32) and transforms it via a mirror-extended Discrete Cosine Transform (DCT-II) to eliminate boundary ringing. An iterative ADMM spectral solver (InpVMDLoops = 6, bandwidth penalty InpVMDAlpha = 250.0) decomposes price into three orthogonal modes strictly at the live right boundary: Mode 1 (noise-stripped macro trend), Mode 2 (band-limited swing momentum), and Mode 3 (high-frequency microstructure noise).
- Stage 2 — 3D RK2 Lorenz Strange Attractor & Orbital Energy Solver: All three VMD modes feed directly into the 3D Lorenz differential equations (σ = 10.0, ρ = 28.0, β = 2.667) and are integrated forward through an 8-step 2nd-order Runge-Kutta (RK2) midpoint solver. The engine extracts the non-inverted horizontal butterfly wing trajectory—smoothly bounded via tanh into the Lorenz_Wing_Wave—while measuring horizontal orbital velocity to compute real-time Chaos Energy (0% to 100%).
Complete Visual Guide & Live Telemetry HUD
Every element in the subwindow (-4.5 to +4.5, dashed reference thresholds at +1.5, 0.0, and -1.5) is engineered for zero-clutter institutional readability:
- Dual-Color Causal VMD Trend Histogram (VMD_Bull_Trend & VMD_Bear_Trend): Plots the noise-stripped VMD Mode 1 backbone directly as bold MediumSeaGreen bars (bullish structural trend) and OrangeRed bars (bearish structural trend).
- Directional Lorenz Butterfly Wing Wave (Lorenz_Wing_Wave): A smooth, continuous Gold curve tracking the RK2 Lorenz attractor trajectory—surging cleanly above +1.5 during strong bullish wing expansions, plunging below -1.5 during bearish wing locks, and staying compressed near 0.0 during unstable saddle-point chop.
- Reversal-Locked Wing-Switch Confirmation Dots (Bull_Wing_Flip & Bear_Wing_Flip): Crisp Lime (bullish) and Magenta (bearish) dots lock directly onto the Gold curve strictly on the exact bar where both the Lorenz Wing Wave breaches +/-1.5 and the VMD Trend Histogram confirms directional polarity following an opposite wing state—eliminating mid-trend signal spam.
- Upper-Right Live Telemetry HUD (InpShowHUD = true): Displays three real-time status readouts cleanly inside the indicator window:
* LORENZ Regime State: Automatically classifies the live market into five distinct states—BULL WING LOCK (Lime), BEAR WING LOCK (OrangeRed), BULL DRIFT (MediumSeaGreen), BEAR DRIFT (Tomato), or SADDLE CHOP (Silver) alongside the exact live wing score.
* VMD TREND Score: Live signed numerical reading of the noise-stripped Mode 1 trend strength.
* CHAOS ENERGY %: Live 0%–100% orbital kinetic energy gauge (illuminating in Gold when energy surges at or above 65%, signaling high-velocity breakout conditions).
How to Trade With This Flagship Indicator
- High-Conviction Bullish Wing Lock (Lime Dot + Green Histogram): When a Lime Bull_Wing_Flip dot prints on the Gold curve above +1.5, backed by expanding MediumSeaGreen VMD bars and a BULL WING LOCK HUD status, both spectral trend and nonlinear chaos dynamics confirm an explosive bullish regime shift.
- High-Conviction Bearish Wing Lock (Magenta Dot + Red Histogram): When a Magenta Bear_Wing_Flip dot locks onto the Gold curve below -1.5 alongside expanding OrangeRed VMD bars (BEAR WING LOCK), institutional bearish momentum is confirmed.
- Saddle-Point Chop & Divergence Filter (-1.5 to +1.5): When the Gold curve lingers inside the -1.5 to +1.5 corridor, CHAOS ENERGY stays muted, or the HUD reads SADDLE CHOP / DRIFT, the attractor has not locked into a clean directional wing—signaling breakout traders and trend bots to stand aside.
- Trend Exhaustion & Profit Taking: Watch for the Gold Lorenz_Wing_Wave to curve sharply back inside +/-1.5 while MediumSeaGreen/OrangeRed VMD bars shrink toward 0.0 to lock in profits ahead of a full wing reversal.
Technical Specifications & EA Buffer Architecture
- Calculation Engine: 100% causal DCT-II mirror-extended ADMM VMD + RK2 ODE solver with zero repainting, zero backpainting, zero boundary ringing, and zero external DLL calls.
- VMD Spectral Inputs: InpVMDWindow (Default: 32, Range 16–64) sets the causal rolling window; InpVMDAlpha (Default: 250.0) controls spectral mode separation tightness; InpVMDLoops (Default: 6, Range 3–15) controls ADMM convergence iterations per bar.
- Lorenz Chaos Inputs: InpSigma (Default: 10.0), InpRho (Default: 28.0), and InpBeta (Default: 2.667) configure the classic Lorenz Prandtl, Rayleigh, and Aspect Ratio ODE constants.
- Signal, HUD & Speed Inputs: InpWingThresh (Default: 1.5) sets the wing-lock threshold for confirmation dots and HUD locks; InpShowHUD (Default: true) toggles the upper-right telemetry readout (automatically disabled during Strategy Tester optimization for maximum speed); InpMaxBars (Default: 1500) caps initial historical bars for instant chart loading.
- Prop-Firm & EA Ready (iCustom Buffer Map): Exposes seven structured data buffers for complete automated strategy integration—VMD_Bull_Trend (Buffer 0), VMD_Bear_Trend (Buffer 1), Lorenz_Wing_Wave (Buffer 2), Bull_Wing_Flip (Buffer 3), Bear_Wing_Flip (Buffer 4), plus two dedicated hidden EA buffers: continuous signed VMD_Trend_Net (Buffer 5) and Lorenz_Chaos_Pct 0–100% (Buffer 6).
####
Timeframe & Volatility Calibration (Customize to Your Chart)
The default configuration (32 VMD window, 250.0 alpha, 6 ADMM loops, 10 / 28 / 2.667 Lorenz constants, 1.5 wing threshold) is balanced for M15–H1 trading across Gold, JPY pairs, Major Forex, and US Indices, while giving advanced traders deep institutional calibration control:
- Fast Intraday & Scalping (M5–M15): Reduce InpVMDWindow to 16–24 and tighten InpWingThresh to 1.1–1.3 for earlier wing-flip dots on rapid intraday swings.
- Ultra-Clean Institutional Swing Structure (H1–H4): Increase InpVMDWindow to 48–64, raise InpVMDAlpha to 400–600 for tighter spectral mode separation, bump InpVMDLoops to 10–12 for sharper ADMM convergence, and raise InpWingThresh to 1.8–2.2 to isolate only dominant macro regimes.
- Tuning Lorenz Nonlinear Dynamics: Keep classic 10 / 28 / 2.667 for standard strange-attractor behavior, or lower InpRho (22–25) for smoother trend damping vs. higher InpRho (32–36) for heightened breakout responsiveness on explosive markets like XAUUSD and NAS100.
- Multi-Chart & VPS Performance: Keep InpMaxBars = 1500 for ultra-light CPU usage across dozens of charts, or expand it to 3000–5000 when visually studying deep historical archives.
-----Also Available for MetaTrader 4 (MT4): Running MT4 instead of MT5? The identically engineered MetaTrader 4 version of Variational Mode Lorenz Chaotic Attractor 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.
