Join our fan page

Multiple EA Tracking with a Magic Number Based Profit and Loss Live Dashboard in MQL5 - expert for MetaTrader 5
- Views:
- 2029
- Rating:
- Published:
- 2025.02.24 16:32
-
Need a robot or indicator based on this code? Order it on Freelance Go to Freelance
When a single account hosts multiple strategies, the core challenge is separating the performance of each one. Without magic numbers, you’d have to rely on partial or ambiguous details like trade comments or ticket ranges. Magic numbers offer a systematic, numeric tag that an EA applies automatically.
Accurate Performance Tracking
You can quickly pinpoint which system has a drawdown or which one is performing exceptionally. This knowledge supports faster decision-making—e.g., deciding to pause an underperforming robot or allocate more capital to a winning strategy.
Simpler Analysis & Logging
Rather than combing through logs or the history tab, you have a concise, single “panel” that aggregates each EA’s total closed profit, deal counts, and relevant comment fields. This helps with record-keeping, strategy optimization, and even client reporting if you manage accounts for others.
Full Code Attached.
Usage Tips

Download all the ticks from your broker for all the symbols in the market watch. Download all history or until a specific date in the past if available.

These are some #define statements that are useful to perform operations in your EA. You only need to assign the name of your variables at the beginning of the file, and then let the other #define statements do the work. In order to use this file, add #include <DEFINE_statements.mqh> to the first line in your EA file.

Time to candle Close. Dynamic text colours. Optimised for back-testing.

The goal is to make the function readily available for any Telegram integration task in MQL5 development. By adding this file to your CodeBase, you can simply include it in your Expert Advisors and call the function directly from the included module. This eliminates the need to redevelop the code from scratch repeatedly, ensuring reusability across multiple projects.