Discussing the article: "Market Microstructure in MQL5 (Part 9): Pullback Quality"

 

Check out the new article: Market Microstructure in MQL5 (Part 9): Pullback Quality.

Part 9 adds a second measurement layer to Part 8's micro‑trend signal: pullback quality. It maps Fibonacci retracement depth to a six‑level PULLBACK QUALITY label, adds an H1 range position from a 60‑bar rolling proxy, and uses lag‑1 momentum autocorrelation. These inputs form a single composite entry‑quality score in [0,1] for filtering setups and sizing trades within MicroStructure_Foundation.mqh.

Part 1 built the defensive infrastructure. Parts 2 and 3 measured long memory. Part 4 measured volatility persistence. Part 5 decomposed noise. Part 6 measured order flow direction. Part 7 classified market regime. Part 8 measured bar-by-bar micro-trend strength with GetMicroTrendStrength() and its adaptive-threshold variant PopulateMicroTrendAnalysis().

Part 9 addresses the following failure mode: GetMicroTrendStrength() returns a positive value whenever price is above an upward-aligned EMA stack. It cannot distinguish between price near the move's leading edge (just above the lowest EMA and extended from consolidation) and price deep in a retracement near the original signal zone.  Both bars carry a positive strength score. They do not carry the same expected value for a long entry.

Fibonacci retracement levels have been used in discretionary trading for decades not because markets "respect" magic ratios, but because they provide a shared vocabulary for describing where price is within a structured move. A retracement to 23.6% is objectively different from one to 61.8%: the former has given back little of the prior advance; the latter has surrendered most of it. Whether a particular retracement level constitutes support is a strategy-specific question. The depth measurement itself is strategy-neutral.

Part 9 adds seven functions to MicroStructure Foundation.mqh and introduces the PULLBACK QUALITY enum and the PullbackAnalysis struct. It also reports an empirical study on 514 NQ M1 NY sessions (May 2024–May 2026). The companion SSRN papers are cited in the references.


Author: Max Brown