Building an MT5 Service for Historical Trade Reports and Push Alerts
Summary
The article explains how to build a MetaTrader 5 service that runs without a chart, monitors account history, compiles closed positions from their constituent deals, and produces trading summaries for terminal logs and smartphone push notifications. Its design uses deal and position objects, collections, and property-based filtering and sorting to organize historical records. The service can aggregate results across accounts used while it has been running, with settings to select which accounts contribute to a report.
The workflow also addresses operational details: checking whether push notifications can be sent, scheduling reports, and delaying messages to respect frequency limits and the platform’s message-length constraint. The article describes a software architecture and reporting process, not a tested trading strategy. The reports can help users review performance over selected periods, but their usefulness depends on correct reconstruction and selection of historical positions; no evidence is offered that the reporting system improves returns or reduces risk by itself.
Key ideas
- A MetaTrader service can run independently of charts and monitor account history over time.
- Closed positions can be reconstructed by grouping historical deals using their position identifiers.
- Object collections with property-based filtering and sorting can organize positions and deals for reporting.
- The service can generate period summaries in terminal logs and send them as push notifications, subject to timing and length limits.
- The article describes reporting infrastructure and does not demonstrate improved trading performance.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.