MESA-ZLSMA Volatility-Adjusted Trend Hunter
Family: trend_following · Regime: trending · Complexity: medium · Asset classes: XAUUSD, EURUSD, GBPUSD · Timeframes: H1, H4
Thesis
The hypothesis is that trend-following systems fail because they cannot distinguish between 'directional volatility' and 'noise volatility'. By using the XAU_TVF to measure trend velocity relative to ATR, we isolate regimes of high directional conviction. Within these regimes, price movements follow cyclical patterns that can be isolated using Ehlers' Roofing Filter (MSTOCH). Entering on these detrended pullbacks and exiting via a zero-lag linear regression model (ZLSMA) provides a statistically superior entry-to-exit ratio compared to standard MA crossovers.
Components
- XAU Trend Volatility Filter (XAU_TVF) (regime) — Acts as the primary regime filter to ensure the market is in a 'clean' trend (High TrendScore) without excessive, directionless volatility (Low VolPressure).
- Supported indicator max boxes count (direction) — Used as the primary price-tracking anchor; ensures the engine is processing live close prices for directional confirmation against the ZLSMA.
- Ehlers MESA Stochastic (MSTOCH) (entry) — Identifies cyclical pullbacks within the established trend. The roofing filter removes spectral noise that typically causes standard stochastics to false-signal in trending markets.
- Zero Lag Least Squares Moving Average (ZLSMA) (exit) — Serves as a low-latency trailing exit. Because it uses the zero-lag technique, it allows the strategy to capture the majority of a trend phase and exit quickly when the momentum shifts.
- News Indicator NMNNFX (risk) — Provides the critical risk overlay. High-impact news events are treated as 'black swan' risks where technical patterns are invalidated by liquidity shocks.
Known failure conditions
- XAU_TVF TrendScore remains between -0.5 and 0.5 for extended periods, indicating a 'dead' market where MSTOCH will generate noise.
- News data feed failure or incorrect formatting in NewsImport.mqh, leading to entries directly into high-impact volatility.
- Price gaps frequently exceeding the ZLSMA distance, causing significant slippage on exits.
Explore the full interactive blueprint, parameter ranges and evidence on WOBR StrategyVerse, or generate this strategy as an MT4/MT5 Expert Advisor with QuantMogul AI Engine.