Skip to content
All library documents

Assessing Backtest Robustness with Trade Dependency and Drawdown Analysis

Article MQL5 code base

Summary

This MetaTrader 5 utility analyzes closed trading history to show how reported performance was formed. Alongside net and gross results, profit factor, win rate, and average and median trade, it examines reliance on the best trades, sensitivity to removing extreme winners or losers, streaks, result distributions, and reconstructed closed-equity drawdown. Results can also be grouped by calendar period, weekday, hour, and trade direction, with sample counts shown. Filters and optional data export are available.

These analyses can expose concentration in a few trades, uneven performance across time, or long underwater and recovery periods. Removing trades is a historical sensitivity exercise, not an improved or revised backtest. The drawdown reconstruction uses completed trades, so it cannot capture floating losses while positions were open. All outputs describe the observed history; they do not establish future profitability or future risk limits. The utility is read-only and reports BUY and SELL activity separately without automatically ranking either side.

Key ideas

  • Trade dependency analysis shows how results change when the strongest trades are excluded.
  • Sensitivity checks also show how removing the weakest trades or periods changes historical results.
  • Drawdown is reconstructed from closed trades and may omit intratrade floating losses.
  • Time, direction, and distribution breakdowns add context, with sample sizes shown.
  • Historical statistics describe observed performance and do not predict future profitability.

Tags

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