Zero-Drift Dual-MLP Neural Gating in MQL5: Eliminating Feature Skew Without External DLLs

21 November 2026, 09:25
Giordan Cogotti
0
6
Zero-Drift Dual-MLP Neural Gating in MQL5: Eliminating Feature Skew Without External DLLs

Most retail neural Expert Advisors fail in live execution for one simple reason: training-inference feature skew. A model trained on Python pandas/TA-Lib approximations rarely sees the exact same normalized state vector as MetaTrader 5 tick-by-tick execution.

1. The Zero-Drift Pipeline (MQL5 → CSV → Python → .mqh)

During the engineering of Goldfinger AI (XAUUSD) and Bitfinger AI (BTCUSD), we eliminated approximation skew completely by exporting exact MQL5 engine state vectors directly from MetaTrader 5 Strategy Tester, fitting z-score standardization constants and Dual-MLP weights ( 35 → 64 → 32 → 1 ), and compiling them natively inside standalone .mqh headers with zero external DLLs.

2. Structural Topology + Temporal Hysteresis

  • Engine I (Spatial Liquidity Topology): Clusters swing pivots within 0.22 × ATR , scores psychological round levels, and verifies structural free room ahead of entry.
  • Engine II (M5 Hysteresis Classifier): Evaluates a 48-bar M5 window against a 7-day baseline (2,016 bars) using 6 confirmation + 6 dwell bars to suppress regime flickering.

3. Inspect the Live Demos on MQL5 Market

Risk Warning: Trading leveraged CFDs involves significant risk of loss. Strategy Tester simulations reflect historical market data and do not guarantee future performance.