MAE and MFE help measure how far price moved against and in favour of a position while the trade was open. Testing a suspicion that a stop loss is too tight requires a consistently defined trade sample, a precise observation window and a separate test of the new stop hypothesis. A few cases in which price recovered after exit do not support that conclusion.
Traders remember the particularly frustrating trade: the stop was filled, then the market soon moved in the intended direction. A journal can also reveal cases where the stop prevented a much larger loss. Include both before changing rules for future trades.
The method described here analyses trades that have already occurred. It does not replace position-sizing calculations or provide individual investment advice. Widening a stop without changing position size increases planned monetary risk. A better historical result does not guarantee the same outcome in future.
What MAE and MFE measure — and what they cannot tell you
MAE means maximum adverse excursion: the largest unfavourable movement during an open trade. MFE means maximum favorable excursion: the largest favourable movement. TradingView's explanation distinguishes these measures from the realised result: a trade may close with a small profit even though its unrealised profit was much larger earlier. See TradingView's performance-chart explanation.
For a simple long position with an unchanged entry price and quantity, start by calculating price points. Adverse movement is the entry price minus the lowest price before exit; favourable movement is the highest price before exit minus the entry price. If there is no movement in the relevant direction, the value is zero. TradingView's MAE and MFE examples illustrate calculations for long positions.
For a short position, the directions reverse: a rise above entry is adverse, and a fall below it is favourable. Before combining both sides, check whether the export already expresses them using the same sign convention. Otherwise, a negative value could mean either a loss or simply a different notation convention.
These maxima do not reveal which event happened first. In one trade, price may pass through a large loss before presenting a profit opportunity. In another, the order is reversed. Testing a stop and profit target also requires the sequence of price events. A pair of extreme values cannot show it.
First define where measurement starts and ends
Use the actual entry-fill time as the start and the actual exit time as the end. If a position was closed in parts or increased, decide whether to analyse separate fills or the combined position. Do not silently apply a simple points calculation to a position whose quantity and average entry price changed.
For every trade, record the instrument, direction, entry and exit times, prices, original stop and filled quantity. Add the price-data source, time zone and data interval. Record commissions and execution slippage in the journal too, so price movement is not later confused with net profit.
Check entry and exit candles particularly carefully. The day's low may have occurred before entry. A candle's high may have occurred after the stop was filled. Assigning a whole candle's extreme to a trade without checking this records movement the position never experienced.
If the available resolution does not reveal the sequence, mark the record as ambiguous. Define beforehand how the analysis will handle such records. Showing uncertainty is safer than choosing the sequence most favourable to you. TradingView's strategy documentation explains how broker-emulator assumptions affect historical fill modelling. See the strategy documentation.
Demonstration table: the same result can hide a different path
Imagine simplified long positions with an entry price of 100 and an original stop at 98. These are educational examples in price points, excluding commissions and slippage. Extreme prices were observed only between each trade's entry and exit.
|
Trade |
Lowest price |
Highest price |
Exit price |
MAE |
MFE |
Gross result |
|
A |
99 |
104 |
103 |
1 |
4 |
3 |
|
B |
98 |
101 |
98 |
2 |
1 |
−2 |
|
C |
99.5 |
103 |
100 |
0.5 |
3 |
0 |
|
D |
98 |
100 |
98 |
2 |
0 |
−2 |
A shows a profit after adverse movement. C finishes at the entry price despite an earlier favourable move. B and D realise the same loss, but their favourable excursions differ. The table does not yet establish whether another stop or profit-taking rule would have helped them.
The price paths of B and D after exit are not included. If price rose later, that period may be studied in a separate simulation with a clearly specified new observation window. Do not suddenly add a post-exit maximum to the existing MFE while implying that it describes the actual trade.
Another limitation is that the old stop itself ends observation. If many trades end there, part of the concentration of MAE at that point follows from the executed rule. It does not reveal how deep the move would have been had the position continued. This is the boundary between describing the journal and testing a counterfactual hypothesis.
Compare the whole sample, not just successful recoveries
First define the sample using rules that can be applied without knowing trade outcomes. For example, use one strategy version, a particular instrument and a continuous period. Record why any entries were excluded. Missing price data is a data-quality reason; an unpleasant result is not.
Then examine profitable, losing and breakeven trades separately without losing sight of the total count. Compare dispersion and extreme observations too. An average alone can conceal a small group with large adverse moves. In a small sample, a precise percentile creates more numerical precision than dependable confidence.
Winners' MAE can help frame a question about how far those trades moved against the position. It does not determine the correct stop for the whole strategy. Losers may move much further, and some trades quickly closed by the old stop would still be open under the new system. Excluding those trades would create a misleading advantage for a wider stop.
If comparing movement in original-risk units, preserve the original risk definition. Recalculating an old result using a new, wider stop distance changes the scale. Show that calculation separately if useful, but not as an identical historical series. State whether risk is expressed in price points or money.
Turning a finding into a testable stop hypothesis
Formulate one change: which entry type and which conditions identifiable in advance will be used to test a different stop rule. Also record what will remain unchanged — the entry signal, cost calculation, profit-taking logic or position-risk budget. If everything changes together, the cause of the result can no longer be identified clearly.
Set evaluation criteria before testing. Alongside the overall result, check loss size, drawdown and holding time. Also ask whether the new rule fits execution and capital constraints at all. A higher profit amount accompanied by an unacceptable risk increase is not the same outcome.
Use data that was not used to select the stop idea. TradingView's documentation distinguishes the sample used for parameter selection from out-of-sample testing and warns against overfitting. See selection bias and out-of-sample testing. If the rule is tuned again to those same data after the test, they no longer provide an independent check.
If a wider stop changes holding time, it may also change the availability of subsequent entries. Recalculating only the trades selected in the old journal is then insufficient. Test the entire strategy sequence with its position and capital constraints. This is a methodological reason to keep the original journal separate from simulation results.
What conclusion can be recorded in the journal?
A useful conclusion is bounded and testable: a particular pattern was observed in the sample, so a test was prepared with conditions fixed in advance. There is not yet a basis for claiming that the new stop is better in all market conditions or will prevent future losses.
Retain the original price data and export file. Beside the calculation table, record the definition used, data limitations and analysis date. Create a separate version if the calculation window or data source changes later. This lets you establish whether the result changed because of the strategy or only the measurement.
Then decide whether the evidence is sufficient for the next controlled test. If it is not, a better data-collection plan may be the outcome. That is a practical benefit too: next time there will be comparable records rather than selected screenshots. A stop need not move merely because the analysis table is complete.
Common questions about MAE and MFE in trading
Does MAE show where to place a stop loss?
It describes observed adverse movement in the selected window. A stop rule must be assessed alongside losing trades, execution, costs and risk limits. In particular, account for the previous stop ending observation. One MAE threshold is insufficient to prove a new rule's advantage.
Is MFE profit that could definitely have been captured?
No. Maximum favourable movement is an observation about the price path. Realising profit would require an exit rule defined beforehand and an executable order. Selecting the journal's maximum after the event does not create such a rule.
Can movement after a stop fill be analysed?
Yes, if that analysis has a separate, consistent period and a clear purpose. Do not mix its result with the actual trade's MAE and MFE. When testing another stop, define the new exit and conditions that prevent selecting a favourable end time after the event.
Next step: a verifiable sample before changing rules
Start by joining a structured trade list with price data. Calculate movement to the actual exit consistently, flag ambiguous records and compare the whole sample. Only then formulate a stop hypothesis to test on other data. The article aims to improve the grounds for a decision, not encourage greater risk.
Choosing position size before entry is a separate question: position sizing by volatility, ATR and stop loss distance. A broader testing sequence is explained in backtesting and forward testing before risking real capital.