Maximum drawdown is one number that hides what really matters: how often an equity curve declines, how long it stays below a previous peak, and how quickly it recovers. This article builds a native MQL5 tool that reconstructs the underwater curve, breaks it into individual drawdown episodes (depth, duration, recovery time), computes the Ulcer Index, Pain Index, and Recovery Factor, and combines them into a single resilience grade with practical recommendations. No external libraries, no Python, no AI.
Let us make the opening example concrete. Suppose two strategies are tested over the same period and the same account size, and both reach a maximum drawdown of 18%. Consider how differently they can get there:
Strategy A has one deep decline. It loses 18% over three weeks, then recovers to a new high within two weeks. For the rest of the year, it trades near its peak.
Strategy B never falls 18% in a single move. Instead, it grinds down in a long series of small losses, spends seven months below its previous peak, and only touches 18% at the very bottom of that long slide.
Both report the same maximum drawdown. A risk filter that looks only at that number would treat them as equal. They are not. Strategy A is a sharp shock followed by a clean recovery. Strategy B is a slow bleed that keeps an account underwater for most of the year, which is far harder to hold and far more likely to make a trader abandon the system at the worst possible moment.
The point is simple. A drawdown you can sit through is survivable. A drawdown that lasts for months tests your discipline, and it tests the patience of anyone whose money you manage. To tell these two cases apart, we need to look past the single worst point and measure the shape of the whole decline.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Check out the new article: Beyond Maximum Drawdown: Building a Drawdown DNA Analyzer in MQL5.
Maximum drawdown is one number that hides what really matters: how often an equity curve declines, how long it stays below a previous peak, and how quickly it recovers. This article builds a native MQL5 tool that reconstructs the underwater curve, breaks it into individual drawdown episodes (depth, duration, recovery time), computes the Ulcer Index, Pain Index, and Recovery Factor, and combines them into a single resilience grade with practical recommendations. No external libraries, no Python, no AI.
Let us make the opening example concrete. Suppose two strategies are tested over the same period and the same account size, and both reach a maximum drawdown of 18%. Consider how differently they can get there:
Both report the same maximum drawdown. A risk filter that looks only at that number would treat them as equal. They are not. Strategy A is a sharp shock followed by a clean recovery. Strategy B is a slow bleed that keeps an account underwater for most of the year, which is far harder to hold and far more likely to make a trader abandon the system at the worst possible moment.
The point is simple. A drawdown you can sit through is survivable. A drawdown that lasts for months tests your discipline, and it tests the patience of anyone whose money you manage. To tell these two cases apart, we need to look past the single worst point and measure the shape of the whole decline.
Author: Cristian David Castillo Arrieta