Full diagnostics of an Expert Advisor
What a MetaTrader report actually contains, once you stop looking at the net profit line alone.
The four pillars of the grade
The health grade runs from 0 to 100 and maps to a letter: A above 80, B above 65, C above 45, D below. It adds four pillars, then subtracts penalties for every dangerous behaviour detected.
Profitability — 30 points
Profit factor, expectancy per trade relative to capital, annualised return. The curve deliberately flattens beyond a profit factor of 2: past that point, a higher score more often signals overfitting than a better edge.
Risk control — 30 points
Maximum drawdown, recovery factor, actual stop-loss usage, and the size of the worst loss relative to capital. This is the pillar that decides whether the account survives, so it carries the heaviest weight alongside profitability.
Consistency — 22 points
Sharpe and Sortino ratios, annualised from the actual trading cadence. Win rate and win/loss ratio are scored together: 40% wins with a ratio of 3 beats 90% wins with a ratio of 0.15.
Robustness — 18 points
Number of transactions, period covered, risk of ruin from the simulation. An excellent robot tested over three weeks cannot reach the top grade: the sample simply does not allow it.
The risk detectors
An aggregate metric can look excellent while hiding a mechanism that will destroy the account. Thirteen detectors look for those mechanisms in the sequence of trades.
How martingale is spotted
The detector does not simply check whether lots grow: a strategy that scales positions with a growing account does that too, with no particular danger. What matters is the gap between two rates.
For every transition between two consecutive trades, we check whether the lot grew, separating the cases where the previous trade won from those where it lost. Capital scaling raises both rates together. A martingale widens the gap: the lot grows after a loss, and not after a win. It is that gap — not the increase itself — that raises the flag.
The Monte Carlo simulation
A backtest shows only one possible arrival order for the trades. By reshuffling that order two thousand times, you get the distribution of plausible scenarios: median drawdown, 95th-percentile drawdown, loss probability, risk of ruin.
Three resampling modes alternate: order permutation, sampling with replacement, and contiguous block sampling. The last one preserves loss clusters that the first two erase — essential as soon as a strategy holds several correlated positions, without which the simulation understates the real risk.