Discussing the article: "Market Microstructure in MQL5 (Part 5): Microstructure Noise"

 

Check out the new article: Market Microstructure in MQL5 (Part 5): Microstructure Noise.

The article extends MicroStructure_Foundation.mqh with a MicrostructureAnalysis struct and five functions that decompose M1 price variation into a quoted spread proxy, Roll-implied spread, OHLC-based noise ratio, order imbalance, and an adverse selection component. A wrapper populates these fields and links them to the volatility suite from Part 4. Empirical thresholds come from 602 NQ E-mini NY sessions (Jan 2024–Jun 2026), helping you gate volatility signals, size risk, and recognize spread-driven frictions.

This article adds two measurement families to MicroStructure_Foundation.mqh. First, it introduces a MicrostructureAnalysis struct and five functions for quoted spread proxy, Roll-implied spread, OHLC noise ratio, order imbalance, and adverse selection. Second, it adds PopulateMicrostructureAnalysis(), which links these outputs to the Part 4 volatility measures and populates the microstructure_noise field reserved in Part 1.

The empirical study in this article uses the same NQ E-mini Nasdaq 100 futures dataset as Part 4, extended to 602 NY sessions covering January 2024 through June 2026. This extension adds the full April 2025 tariff shock window and captures all five stress regimes relevant to the series. The companion SSRN paper documenting the empirical foundation is available at SSRN 6847024.

Before the implementation sections, one point requires explicit framing. The Roll-implied spread returns values approaching zero on NQ M1 data. This is the empirically correct result, not a bug. At one-minute resolution on a futures contract with hundreds of trades per bar and a minimum tick size of 0.25 points, the serial covariance of close-to-close returns is dominated by intrabar price discovery rather than by the bid-ask bounce. The function is retained in the toolkit for instruments or timeframes where the bounce is detectable, and as the theoretically correct foundation for users applying it to sub-minute bar data. The empirical section states this plainly.

Author: Max Brown