Home > Blog > Monte Carlo Testing: Measuring the Luck Range of Drawdown

Monte Carlobacktestrisk management

Monte Carlo Testing: Measuring the Luck Range of Drawdown

Published: 2026-10-21Read time: about 3 min
⏱ This article reflects information as of its publish date. EA performance figures (PF, DD, annual return) change with live trading and re-validation — check the latest on the EA pages. See the latest EA results →

Bottom line: a backtest's maximum DD is just one outcome

The maximum drawdown (DD) in a backtest report is the value you get when past price moves happened to line up in that particular order. Even with identical wins and losses, a different order can make the DD shallower or deeper.

Monte Carlo testing reshuffles the order of trades many times and looks at how widely the DD scatters. When choosing an EA, we recommend not treating the backtest's maximum DD as a single point, but asking where it sits within the distribution. That said, this method leaves many things unanswered, and we cover its limits later in the article.

📧 Free 8-email course + subscriber-only pack of 13 MT5 indicators

Right after you sign up, you get a download link for a subscriber-only pack of our 13 MT5 indicators: compiled files (.ex5), source code and a setup guide. Then 8 emails on algo-trading essentials, reading backtests correctly and choosing a broker (one a day for the first 5 days, then 7, 14 and 30 days after signing up). You also get notified before each price rise of the versions sold on the MQL5 Market (launch pricing that steps up as copies sell). Our EAs are free on this site with a live account at a partner broker.

* Privacy strictly protected. You can unsubscribe at any time.

How it works: shuffling leaves total profit unchanged and changes only the DD

What changes when you shuffle

With a fixed lot size, reordering trades leaves total profit the same. PF and win rate don't change either. Even with compounding, where lot size is set as a fixed percentage of equity, profits and losses are chained by multiplication, so the final balance comes out the same.

What changes is the path in between. If losses happen to cluster, the DD gets deeper; if wins and losses alternate, it stays shallower. The length of losing streaks also changes with the order.

The lower the win rate, the wider the spread tends to be

Take ATLAS as an example: in its backtest it had a win rate of 33.2% and a maximum losing streak of 13. Trend-following EAs with low win rates are prone to orderings where losses run together. After reshuffling, some combinations will naturally produce a losing streak longer than the 13 recorded in the backtest. You can't say "the backtest's worst streak was 13, so it won't get worse than that."

Steps: how to do it yourself

The MT5 tester has no built-in function for shuffling trade order. In practice, you export the trade list from the report and process it in a spreadsheet or a script.

  1. Export the list of profits and losses for closed trades from the MT5 backtest report
  2. Randomly reorder the sequence of profits and losses
  3. Rebuild the balance curve in the shuffled order and record the maximum DD and maximum losing streak
  4. Repeat steps 2–3 about 1,000 times
  5. Sort the recorded DDs from smallest to largest and look at the median and the value around the top 5%
  6. Check where the backtest's maximum DD falls within the distribution

If the backtest's maximum DD sits on the shallow side of the distribution, the historical data may have been a "lucky ordering." In that case, it is safer to size your trading capital assuming the deep side of the distribution.

What each method tells you

MethodWhat you doWhat it tells youWhat it doesn't tell you
Order shuffleRearrange the same tradesSpread of DD and losing streaksEffects of the trades themselves changing
Resampling (with replacement)Redraw trades, allowing duplicatesSpread of total profit itselfEffects of market conditions changing
Random skipRemove some tradesResilience to missed fills or downtimeCases where downtime clusters in losing periods
Cost add-onSubtract an adverse amount from each tradeResilience to wider spreadsHow real costs actually shift

Shuffling alone produces only one final profit figure. If you also want to see the spread on the profit side, combine it with resampling.

Limits and cautions: Monte Carlo is not a cure-all

The assumption that trades are independent

Shuffling treats each trade as unrelated to the others. In real markets, high-volatility periods and trendless periods come in clusters. Losses often concentrate not by chance but because of the market phase. Random ordering dilutes this "clustering of losses," which means it may underestimate the DD relative to reality.

It only sees closed-trade P&L

A balance curve built from a trade list does not include floating losses on open positions. For example, GOLD KING v6 had a balance DD of 7.45% in its backtest, while its effective DD including floating losses was 91.3%. Shuffling only closed-trade P&L for an EA like this badly misjudges the risk. Be especially careful with averaging-down (martingale-style) EAs, grid EAs, and EAs with long holding times.

You can't see beyond the original data

Shuffling is merely a rearrangement of trades that already happened. Losses from market conditions that never occurred during the test period (a sudden regulatory change, a liquidity drought) will never show up in the distribution, no matter how many runs you do. For EAs with few trades, the original sample is small, so the distribution itself is less reliable.

There is no guarantee that "sizing capital to survive the top-5% DD will keep you safe." All it tells you is "the range of luck within rearrangements of past trades."

Summary

  • A single backtest's maximum DD is just one sample from one ordering
  • Shuffling trade order leaves total profit, PF, and win rate unchanged; only the DD and losing-streak length change
  • Repeat about 1,000 times to build a DD distribution, then see where the backtest value falls
  • The lower an EA's win rate, the more likely orderings with longer losing streaks than the backtest become
  • Losses clustered by market phase, floating losses, and market conditions outside the test period cannot be captured by shuffling
  • Set capital and lot size with a margin, assuming the deep side of the distribution

Each EA's maximum losing streak, balance DD, and effective DD are listed in the measured ranking of all EAs. The trade list of DONCHIAN ENGINE, a trend-following EA with a 34.5% win rate, makes a handy practice subject for shuffle testing. Other articles on testing methods are collected in EA & MT5 Know-How.

📧 Free 8-email course + subscriber-only pack of 13 MT5 indicators

Right after you sign up, you get a download link for a subscriber-only pack of our 13 MT5 indicators: compiled files (.ex5), source code and a setup guide. Then 8 emails on algo-trading essentials, reading backtests correctly and choosing a broker (one a day for the first 5 days, then 7, 14 and 30 days after signing up). You also get notified before each price rise of the versions sold on the MQL5 Market (launch pricing that steps up as copies sell). Our EAs are free on this site with a live account at a partner broker.

* Privacy strictly protected. You can unsubscribe at any time.

Have a question about EAs or FX?

You can post it on the Nattzy trading forum (free sign-up). Questions beyond this article are welcome too — EA settings, choosing a broker and more.

Ask on Nattzy ↗

Comments & questions