cTrader

AlgoWay Blog

Guides, manuals and platform references.

Core
JSON & Alerts
MT5 / Expert Advisors
Errors
Integrations
Other Publications
AlgoWay Strategy Lab

MAE and MFE Explained: Read the Path Inside Each Trade

AlgoWay trading automation

A trade closes with a $100 profit. That tells you where it finished, not whether it first lost $80, briefly gained $300, or went straight to the exit. Maximum adverse excursion (MAE) and maximum favorable excursion (MFE) describe those missing parts of the journey.

MAE measures the largest move against a trade while it is open; MFE measures the largest move in its favor. Neither is the final realized result. MetaTrader 5 includes both in its Strategy Tester report, alongside comparisons with trade outcomes.

For an automated strategy you plan to use with AlgoWay, excursion analysis can help form a precise exit hypothesis. It cannot supply a live instruction to sell at a peak that becomes identifiable only afterward. Keep simulated trades separate from actual account executions, and define quantities explicitly when testing partial take profits.

Calculate three different numbers from one price path

Consider a hypothetical long position of 100 shares bought at $100 and sold at $101. Between those fills, the observed price falls to $99.20 and rises to $103. Assume the size stays constant and ignore fees, spread, financing and slippage. This is an arithmetic illustration, not a recorded trade or strategy test.

MeasurementPer-share calculationFor 100 shares
MAE, expressed as a positive loss magnitude$100 − $99.20 = $0.80$80 adverse excursion
MFE$103 − $100 = $3$300 favorable excursion
Realized gross profit$101 − $100 = $1$100

The $300 was an observed opportunity under these assumptions, not money booked to the account. The $80 was an interim loss, not an additional realized loss to subtract from the $100 result. Adding these three numbers together would be like adding a car's top speed to its mileage.

For a fixed-size long trade, use the lowest price during the holding interval for adverse movement and the highest for favorable movement. For a short, reverse the direction: a rise above entry is adverse, and a fall below entry is favorable. Include entry as the baseline so an excursion cannot become negative simply because price never moved to that side.

A short entered at $100, reaching $101.50 and $96 before exiting at $98, therefore has a $1.50 adverse excursion, $4 favorable excursion and $2 gross profit per unit. All extrema must occur while the trade is open. Tomorrow's low does not belong to yesterday's closed trade.

Choose the units before comparing trades

Price distance, cash, percentage and risk multiples answer different questions. In the long example, the adverse distance is 0.8% of entry price and the favorable distance is 3%. Those are price percentages, not account-equity returns.

If the initial planned risk was $200, call that amount 1R. The same observations become 0.4R MAE, 1.5R MFE and 0.5R realized gross profit. Keep that original denominator when comparing exit alternatives; redefining R after a stop moves changes the ruler halfway through the measurement.

For futures, convert price movement using the contract's tick size and tick value. For instruments with another settlement currency, currency conversion may also matter. Do not multiply an excursion by today's position size if the historical position had a different size.

Software conventions deserve a check. A report might display adverse movement as a negative value or a positive magnitude. It may report price excursion separately from position profit. Tradervue, for example, explicitly distinguishes those measurements and documents its use of one-minute data and exclusion of entry and exit bar extremes in its trade-statistics reference. Two reports can disagree because they measured different things.

A pair of extremes does not preserve their order

The long example could have followed either of these paths:

  • Entry at $100, dip to $99.20, rally to $103, exit at $101.
  • Entry at $100, rally to $103, dip to $99.20, exit at $101.

Both have the same MAE, MFE and final profit. A trailing stop activated after a $2 gain would encounter very different sequences. The summary statistics cannot tell you when that activation occurred or what price came next.

This is also why a chart bar containing both a high target and a low stop cannot, by itself, prove which filled first. Use suitably detailed data and the simulator's order rules. If you are studying MT5 results, the distinction between real and generated ticks matters when reconstructing the path.

Use excursions to propose an exit, then rerun it

Suppose many historical winners show less than 0.5R MAE. That observation can motivate a test of a tighter stop. It does not prove that a 0.5R stop improves the strategy. Include losers, account for fill costs, and rerun the complete rule: the new stop may remove recovering winners, alter later entries, or change how long capital stays committed.

Similarly, an MFE of 1.5R does not establish that a 1.5R target could have filled. The observed price, available liquidity and order timing still matter. A large gap between MFE and realized profit is a question to investigate, not automatic evidence of a bad exit. A trend-following exit can deliberately surrender part of a move to remain exposed to longer trends.

Partial exits add another complication. After selling half the position, multiplying the later favorable distance by the original full size overstates the profit available on the remaining shares. Reconstruct quantities and realized cash flows through time, or explicitly label the statistic as a price-only excursion.

  1. Choose one trade definition, price source, sign convention and unit.
  2. Record entry, exit, size changes, initial risk, excursion values and the times of the extrema when available.
  3. Compare winners and losers across the full sample, rather than selecting attractive examples.
  4. Translate the observation into a rule available in real time, such as a fixed target or a trailing-stop activation condition.
  5. Test the revised rule with costs on a separate period before considering live automation.

MAE and MFE are useful witnesses. They can describe where a trade went. They cannot tell an automated strategy what tomorrow's turning point will be.

Last updated: October 22, 2026