Discussing the article: "Price Action Analysis Toolkit Development (Part 71): Weekend Gap Structure Mapping in MQL5"

 

Check out the new article: Price Action Analysis Toolkit Development (Part 71): Weekend Gap Structure Mapping in MQL5.

The article delivers an object-based MQL5 implementation that detects weekend gaps from time discontinuities and renders them directly on the chart. It manages graphical objects, tracks state transitions (fresh, partial, reaction, filled), and preserves completed gaps as historical zones. The result is a reproducible framework for monitoring how price revisits and fills weekend gap structures.

Weekend gaps are often revisited after trading resumes, making them useful liquidity reference zones throughout the week. The challenge is that these structures are usually identified manually, and once new price action develops, older zones become difficult to track consistently. For traders, the main challenge is to maintain consistent structural interpretation as new price action develops and older imbalance zones gradually move out of view. For developers, the challenge is to build a chart-based system that detects session discontinuities, preserves structural boundaries over time, and reliably updates the visuals during normal chart operation.

This article develops a weekend gap framework in MQL5 that detects gaps directly from trading-session time discontinuities and renders them as structured chart objects. The indicator draws the gap range, midpoint, and reference labels. It preserves older gaps as historical zones and updates active gaps in real time using the states: fresh, partial, reaction, and filled. The implementation focuses on stable chart visualization, object lifecycle management, and reproducible gap tracking. This framework can later support more advanced interaction analysis and automated weekend-gap trading logic.

Author: Christian Benjamin