Building a Multi-Timeframe Market Structure Engine in MQL4
Over the past few months, I’ve been building a large-scale Smart Money Concepts (SMC) research engine in MQL4 focused on detecting and tracking market structure across multiple timeframes.
The project evolved from simple Fair Value Gap (FVG) detection into a complete visualization and backtesting system capable of handling:
- Fair Value Gaps (FVGs)
- Swing Highs / Swing Lows
- Swing Breaks
- Multi-timeframe confluence
- Bullish/Bearish zones
- “Golden Zones” (H4 zones merged with D1 structure)
One of the biggest challenges was engineering a proper zone lifecycle system inside MetaTrader 4:
- zone creation
- extension
- mitigation
- truncation
- invalidation
- object cleanup
The goal was not simply generating buy/sell signals, but building a framework capable of analyzing which structural patterns remain statistically consistent across thousands of historical market scenarios.
The project is now evolving toward:
- large-scale backtesting
- CSV-based analytics pipelines
- Python/vectorBT integration
- AI-assisted market pattern research
Stack
MQL4, Python, Pandas, Plotly, Dash, MetaTrader 4
Top comments (0)