Skip to content
All library documents

Classifying Market Structure from Swings in an MQL5 Analyzer

Article MQL5 articles

Summary

This article outlines a MetaTrader 5 indicator framework that converts price bars into a structured account of recent market behavior. It detects confirmed swing highs and lows, enriches them with labels such as higher high or lower low, and records move size, duration, and retracement. A separate state object summarizes the latest structure, phase, expected next swing form, and whether the structure appears intact or threatened.

The implementation is organized as a pipeline from price data through swing analysis and interpretation to chart presentation. It also describes interactive visualization, including labels, connecting lines, a dashboard, and a swing inspector. The framework is explicitly descriptive rather than predictive: it reports the latest confirmed structure and offers no evidence of forecasting accuracy or trading profitability. Results depend on settings such as lookback, confirmation depth, and minimum pivot distance, so those choices affect which swings and interpretations appear.

Key ideas

  • Confirmed swing highs and lows provide the base observations for the analyzer.
  • Structural labels and move measurements add context to each detected pivot.
  • A market state object summarizes structure, phase, retracement, and structural status.
  • The pipeline separates detection, interpretation, and chart visualization.
  • The analyzer describes confirmed behavior and does not claim to predict future prices.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.