Skip to content
All library documents

Measuring Drawdown Depth, Duration, and Frequency from Realized P&L

Article MQL5 code base

Summary

The document presents a way to assess trading-system drawdowns across three dimensions: depth, time spent below a prior equity peak, and frequency of episodes. It describes a report generated from closed trading history, including current underwater status and a ranked list of past episodes. The intended use is to establish a historical range for comparison before trading, and to review a system when current drawdowns exceed its past experience. It also recommends comparing a single system with the combined live account.

The calculation follows realized profit and loss, opening an episode when the curve falls below its running high and ending it only at a new high. Entry commissions are included, while partial exits are counted by deal for P&L and grouped by position for trade counts. The examples illustrate the report but do not establish future risk limits. Deposits and withdrawals are excluded, floating losses are invisible, and results depend on the history available in the platform.

Key ideas

  • Drawdown assessment should include depth, duration, and episode frequency.
  • An episode remains open until realized equity makes a new high.
  • Entry commissions are included, and partial closes are grouped by position for activity counts.
  • Historical episodes can provide a comparison range for monitoring a system.
  • Realized-P&L analysis excludes floating excursions and deposits or withdrawals.

Tags

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