A Modular Event-Driven Market Structure Framework in MQL5
Summary
The article presents a prototype MQL5 framework that makes market structure data available to other trading software through a modular API. Its components detect swing highs and lows, track protected levels, classify breaks as continuation or change-of-character events, update a market-state machine, and retain event history. An event bus uses a circular buffer and signature cache to store recent events and suppress duplicates during recalculation. The framework also includes multi-timeframe synchronization and CSV persistence.
The stated aim is reusable infrastructure for Expert Advisors, dashboards, or research pipelines, rather than a trading strategy or source of entry signals. The article describes a layered design divided across include files and an indicator wrapper, and it identifies the trend model and confidence heuristic as simplified. It offers architectural guidance but no evidence of trading performance; the author describes the implementation as a prototype requiring stronger classification, synchronization, persistence, and testing before production use.
Key ideas
- The framework separates market-structure logic into modules and exposes results through a shared API.
- An event bus records swings, structural breaks, character changes, and state transitions.
- A cache suppresses duplicate events when historical data is recalculated.
- The prototype supports multi-timeframe synchronization and CSV event logging.
- Its simplified trend and confidence logic need further development, and it provides no trading-performance evidence.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.