TesterReport.mqh reads a Strategy Tester report saved as HTML (Backtest tab > right click > Report > HTML) and gives you its deals, its closed trades and the main figures, so other MQL5 code can work with a backtest after it is saved: compare reports, combine them into a portfolio, export them, or check them against the account history.
#include <TesterReport\TesterReport.mqh>
CTesterReport report;
if(report.Load("MyTest.htm")) // a file in MQL5\Files; Load(file, true) for the common folder
{
for(int i = 0; i < report.Trades(); i++)
{
SReportTrade t;
report.Trade(i, t); // open, close, symbol, buy, volume, entry, exit, profit, swap, commission, net, balance
}
double maxMoney, maxPercent, relMoney, relPercent;
report.BalanceDrawdowns(maxMoney, maxPercent, relMoney, relPercent);
}
else
Print(report.LastError()); Reports saved by the terminal are UTF-16; UTF-8 copies are read too.
The script TesterReportExample.mq5 reads a report from MQL5\Files, prints the summary and the results by symbol and side, and writes every closed trade to a CSV file (picture 1).

The Balance column of the CSV the example wrote, drawn trade by trade: 1750 trades from a deposit of 10 000 to 12 998.23. The grey area is the distance below the previous high. Its deepest point, 8 312.81 on 26 May 2026, is the maximal balance drawdown printed in the log above.

The same trades grouped by symbol and side and added up in the order they closed; each line ends at the net printed in the log. Almost all the profit came from XAUUSDm buys (+10 582), while the XAUUSDm and EURUSDm sells lost about 4 000 each.

On 12 saved reports (one to seven symbols, execution delay, withdrawals during the test, deposits from 2 000 to 100 000), the net profit and both balance drawdowns were equal to the figures in the report header, and the 9 874 closed trades were identical to an independent Python reader of the same files.
TesterReport.mqh goes to MQL5\Include\TesterReport, TesterReportExample.mq5 to MQL5\Scripts\TesterReport.
Live Test Bench: automated checks of an EA on a demo account
Automated checks of an Expert Advisor on a live demo chart (restart, second copy, server history, chart button) with a PASS/FAIL report.
AccountGuard - lock your EA to licensed accounts (single include)
Single-header account lock for MT5 EAs: licensed account numbers, optional demo allowance, expiry date, tester bypass. Licence compiled in with #define. No DLL.
PortfolioWeights: risk parity, HRP, minimum variance and maximum diversification
Portfolio weights from the returns of symbols or Expert Advisors: inverse volatility, risk parity, hierarchical risk parity, minimum variance, maximum diversification, Ledoit-Wolf covariance.
DrawdownBootstrap: Monte Carlo of the maximal drawdown
Block bootstrap of daily results: how deep the drawdown of an account or strategy can get over the next months, with percentiles and a seeded generator for repeatable runs.