Skip to content
All library documents

Analyzing Trading Performance by Market Session in MQL5

Article MQL5 articles

Summary

The article describes an MQL5 dashboard for examining which market sessions contribute to closed-trade performance. It reads deal history over a configurable lookback period, assigns each closing deal to Sydney, Tokyo, London, or New York using UTC boundaries, and aggregates net profit and loss, win rate, trade count, and average holding time. Results appear as a color-coded chart and a summary table in the terminal.

The workflow separates history reading, session classification, aggregation, and display, and includes a verification script for boundary handling and metric calculations. UTC avoids dependence on broker server time changes, but the results still depend on the chosen session definitions and time basis. Open times are recovered by scanning deals for the same position; if the opening deal is outside the selected history range, the fallback to close time understates holding duration. Overlapping session windows are resolved according to boundary order, and the dashboard summarizes historical records rather than demonstrating that session-level performance will persist.

Key ideas

  • Closed deals are grouped by the UTC time at which each deal closes.
  • The dashboard reports net profit and loss, win rate, trade count, and average holding time by session.
  • Separating history reading, classification, aggregation, and display makes the analytics pipeline adaptable.
  • A missing opening deal within the selected range can cause holding time to be understated.
  • Overlapping session boundaries are handled in configured order, so boundary choices affect classification.

Tags

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