Skip to content
All library documents

Building an MQL5 Dashboard for Account Statistics with SQLite

Article MQL5 articles

Summary

This article describes an MQL5 indicator that uses SQLite to present account trading history and statistics in an interactive dashboard. The interface separates symbol and magic-number lists from detail tables, sorts trade history by time and summary statistics by net profit, and lets users select an item to inspect its results. The tutorial also discusses dashboard and table changes that enable scrolling beyond panel boundaries and support linked, collapsible panels.

The database logic aggregates account activity and groups results by symbol or strategy identifier. A specific data-quality issue arises when an expert advisor opens a position and a person closes it manually: the opening and closing deals may carry different magic numbers. The article explains that trade construction must account for this mismatch to avoid incorrect long and short counts. It provides implementation guidance and an example dashboard, but no trading-performance analysis; its subject is account reporting and data handling.

Key ideas

  • A bufferless MQL5 indicator can display account history and statistics in a graphical dashboard.
  • Trade history can be ordered by execution time, while symbol and magic-number summaries can be ranked by net profit.
  • Scrollable tables require allowing their coordinates to extend outside the visible panel area.
  • Trade aggregation should handle positions whose opening and closing deals have different magic numbers.

Tags

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