Page 1 of 1
MAE and MFE: Two Numbers That Reveal How Your Trades Really Behave
Posted: Tue Oct 06, 2026 8:13 am
by Fairman
MAE and MFE: Two Numbers That Reveal How Your Trades Really Behave
Maximum adverse excursion, or MAE, is the largest distance a trade moved against you before it closed. Maximum favorable excursion, or MFE, is the largest distance it moved in your favor. Recording both turns each trade into a small story about how price behaved.
Measure them in pips or R. For a winning trade that dipped 8 pips against you before reaching a 30-pip profit, MAE is 8 and MFE is at least 30. For a loser that first went 15 pips in profit before reversing to your stop, MFE is 15 even though the trade lost.
Why bother? These numbers answer practical questions. If most winners have a small MAE, say never more than 40 percent of the stop distance, then a tighter stop might have kept the same winners with less risk. If many losers had a large MFE, you may be giving back profit that a different exit would have kept.
Most platforms do not record these automatically, but you can estimate them from chart review, or use journaling software that calculates them. Even a quick estimate for each trade, noted at review, gives useful data.
The analysis needs a decent sample, at least thirty or forty trades per setup.
Be careful not to optimize too finely. Use the results to identify broad patterns, not exact numbers.
Practical step: add MAE and MFE columns to your journal, and fill them in for your last twenty trades from the charts.
Re: MAE and MFE: Two Numbers That Reveal How Your Trades Really Behave
Posted: Tue Oct 06, 2026 8:47 am
by Fairman
If your platform has a trade history export with high and low during the trade, some journal tools can fill these in automatically. Saves a lot of chart scrolling. If not, a decent shortcut is to do it only during the weekly review. Open each trade on the 5 minute chart, find the worst point against you and the best point in your favour between entry and exit, and note both in pips. It takes maybe a minute per trade. Even rough numbers become useful after thirty or forty trades. You don't need perfect precision to see patterns like winners rarely going more than half the stop against you.
Re: MAE and MFE: Two Numbers That Reveal How Your Trades Really Behave
Posted: Tue Oct 06, 2026 9:00 am
by Fairman
Losers with a big MFE are the ones that sting the most to review. They tell you the idea was often right, but the exit plan wasn't. If you find, say, a third of your losers were at least 1R in profit before turning, that's worth digging into. It doesn't automatically mean you should move stops to breakeven. That can cut winners too. But it might mean taking a partial at 1R, or trailing behind structure once the trade has moved a certain amount. Test any change on your past trades before using it live, because the cost to the winners is easy to overlook when you're focused on the painful losers.
Re: MAE and MFE: Two Numbers That Reveal How Your Trades Really Behave
Posted: Tue Oct 06, 2026 9:59 am
by PTScalper
Fairman wrote: Tue Oct 06, 2026 8:13 am
MAE and MFE: Two Numbers That Reveal How Your Trades Really Behave
Maximum adverse excursion, or MAE, is the largest distance a trade moved against you before it closed. Maximum favorable excursion, or MFE, is the largest distance it moved in your favor. Recording both turns each trade into a small story about how price behaved.
Measure them in pips or R. For a winning trade that dipped 8 pips against you before reaching a 30-pip profit, MAE is 8 and MFE is at least 30. For a loser that first went 15 pips in profit before reversing to your stop, MFE is 15 even though the trade lost.
Why bother? These numbers answer practical questions. If most winners have a small MAE, say never more than 40 percent of the stop distance, then a tighter stop might have kept the same winners with less risk. If many losers had a large MFE, you may be giving back profit that a different exit would have kept.
Most platforms do not record these automatically, but you can estimate them from chart review, or use journaling software that calculates them. Even a quick estimate for each trade, noted at review, gives useful data.
The analysis needs a decent sample, at least thirty or forty trades per setup.
Be careful not to optimize too finely. Use the results to identify broad patterns, not exact numbers.
Practical step: add MAE and MFE columns to your journal, and fill them in for your last twenty trades from the charts.
Hi Fairman,
Understanding
Maximum Adverse Excursion (MAE) and
Maximum Favorable Excursion (MFE) transitions a trader from simply tracking wins and losses to analyzing the total lifecycle of every position. While a standard trade journal records only the final destination, MAE and MFE map the exact journey, revealing hidden inefficiencies in your risk management, entry timing, and exit strategies.
Re: MAE and MFE: Two Numbers That Reveal How Your Trades Really Behave
Posted: Tue Oct 06, 2026 9:59 am
by PTScalper
Decoding MAE to Optimize Stop Losses
MAE measures the maximum "heat" or drawdown a trade takes before being closed. Analyzing this metric allows you to objectively tighten or loosen your stop losses based on empirical data rather than fear.
The "Too Wide" Stop: If your analysis shows that 90% of your winning trades never experience an MAE greater than 15 pips, but your standard stop loss is 30 pips, you are risking twice as much capital as necessary. Halving your stop loss doubles your position size for the same risk, drastically improving your Risk/Reward (R) multiple.
The Premature Entry: If your losing trades consistently hit your stop loss, but the market frequently reverses back in your intended direction shortly after, your timing is off. A high MAE on "correct" ideas indicates you need a wider stop or, more optimally, to wait for a deeper pullback before entering.
Re: MAE and MFE: Two Numbers That Reveal How Your Trades Really Behave
Posted: Tue Oct 06, 2026 10:00 am
by PTScalper
Leveraging MFE to Maximize Profit Capture
MFE measures the maximum potential profit that was available during the trade's lifespan. It highlights the gap between what the market offered and what you actually secured.
Leaving Money on the Table: If a specific setup consistently reaches an MFE of 3R (three times your risk) but your average captured win is only 1R, your exit strategy is inefficient. You might be closing trades prematurely out of anxiety.
Giving Back Profits: Conversely, if your trades frequently spike to a high MFE but close as break-even or losing trades, you are holding on too long. This data signals the need for aggressive trailing stops or taking partial profits (scaling out) at the historical MFE cluster points.
Re: MAE and MFE: Two Numbers That Reveal How Your Trades Really Behave
Posted: Tue Oct 06, 2026 10:00 am
by PTScalper
The MAE/MFE Scatter Plot Analysis
Professional trading journals map these two metrics on a scatter plot to visually diagnose a trading system.
The Perfect Quadrant: Your most robust setups will cluster in the low MAE / high MFE zone. These are trades that immediately move in your favor and require minimal emotional capital to manage.
The Danger Zone: Trades with high MAE and high MFE represent extreme volatility. Even if these trades ultimately win, they require enduring deep drawdowns. Relying on them often leads to psychological burnout and inconsistent equity curves.
Re: MAE and MFE: Two Numbers That Reveal How Your Trades Really Behave
Posted: Tue Oct 06, 2026 10:00 am
by PTScalper
Advanced Tracking and Implementation
While tracking in pips or ticks is a good start, measuring MAE and MFE in R-multiples (Risk) standardizes your data across different assets and volatilities. For example, an MAE of 0.5R means the trade went exactly halfway to your stop loss.
When tracking this manually or through software like Tradervue or Edgewonk, avoid the trap of curve-fitting. Do not adjust your system to account for a single outlier trade. Look for clusters of behavior over a minimum of 40 trades to find reliable zones where price typically exhausts itself.
What specific asset or trading setup are you currently journaling that might benefit the most from this type of excursion analysis?
Re: MAE and MFE: Two Numbers That Reveal How Your Trades Really Behave
Posted: Tue Oct 06, 2026 10:02 am
by PTScalper
Here it is version written in Pine Script:
Code: Select all
//@version=5
strategy("MAE & MFE Tracker Dashboard", overlay=true, initial_capital=10000, default_qty_type=strategy.percent_of_equity, default_qty_value=10)
// =========================================================================
// 1. DUMMY STRATEGY (Replace this with your own entry/exit logic)
// =========================================================================
fastLen = input.int(10, "Fast EMA")
slowLen = input.int(20, "Slow EMA")
fastEMA = ta.ema(close, fastLen)
slowEMA = ta.ema(close, slowLen)
longCond = ta.crossover(fastEMA, slowEMA)
shortCond = ta.crossunder(fastEMA, slowEMA)
if longCond
strategy.entry("Long", strategy.long)
if shortCond
strategy.entry("Short", strategy.short)
// =========================================================================
// 2. MAE / MFE TRACKING ENGINE
// =========================================================================
var float ep = na // Entry Price
var float hh = na // Highest High during trade
var float ll = na // Lowest Low during trade
var int last_dir = 0 // 1 for Long, -1 for Short, 0 for Flat
var mfeArray = array.new_float(0)
var maeArray = array.new_float(0)
// Determine current position status
int current_dir = strategy.position_size > 0 ? 1 : strategy.position_size < 0 ? -1 : 0
// A) Trade Closed or Reversed: Calculate and Store Data
if last_dir != 0 and current_dir != last_dir
float mfe = na
float mae = na
if last_dir == 1 // Closed a Long
mfe := (hh - ep) / syminfo.mintick
mae := (ep - ll) / syminfo.mintick
else if last_dir == -1 // Closed a Short
mfe := (ep - ll) / syminfo.mintick
mae := (hh - ep) / syminfo.mintick
array.push(mfeArray, math.max(0, mfe))
array.push(maeArray, math.max(0, mae))
// B) New Trade Opened (Including Reversals): Reset Extremes
if current_dir != 0 and current_dir != last_dir
ep := strategy.position_avg_price
hh := high
ll := low
// C) Currently in a Trade: Update Extremes constantly
if current_dir != 0
hh := math.max(hh, high)
ll := math.min(ll, low)
// Safety check if entry price was delayed
if na(ep) or ep == 0
ep := strategy.position_avg_price
last_dir := current_dir
// =========================================================================
// 3. ON-CHART DASHBOARD & STATISTICS
// =========================================================================
if barstate.islast
// Calculate Averages
totalTrades = array.size(mfeArray)
avgMfe = totalTrades > 0 ? array.avg(mfeArray) : 0
avgMae = totalTrades > 0 ? array.avg(maeArray) : 0
rewardRiskRatio = avgMae > 0 ? avgMfe / avgMae : 0
// Draw Table
var tbl = table.new(position.bottom_right, 2, 5, bgcolor=color.new(color.gray, 90), border_width=1, border_color=color.gray)
// Headers
table.cell(tbl, 0, 0, "Trade Metric", text_color=color.white, bgcolor=color.new(color.blue, 60))
table.cell(tbl, 1, 0, "Value (Ticks)", text_color=color.white, bgcolor=color.new(color.blue, 60))
// Total Trades
table.cell(tbl, 0, 1, "Total Trades Logged", text_color=color.white)
table.cell(tbl, 1, 1, str.tostring(totalTrades), text_color=color.white)
// Average MFE
table.cell(tbl, 0, 2, "Average MFE (Profit Potential)", text_color=color.new(color.green, 0))
table.cell(tbl, 1, 2, str.tostring(math.round(avgMfe, 2)), text_color=color.new(color.green, 0))
// Average MAE
table.cell(tbl, 0, 3, "Average MAE (Drawdown)", text_color=color.new(color.red, 0))
table.cell(tbl, 1, 3, str.tostring(math.round(avgMae, 2)), text_color=color.new(color.red, 0))
// MFE / MAE Ratio
ratioColor = rewardRiskRatio >= 2 ? color.new(color.green, 0) : rewardRiskRatio >= 1 ? color.new(color.yellow, 0) : color.new(color.red, 0)
table.cell(tbl, 0, 4, "MFE / MAE Ratio", text_color=ratioColor)
table.cell(tbl, 1, 4, str.tostring(math.round(rewardRiskRatio, 2)), text_color=ratioColor)
Re: MAE and MFE: Two Numbers That Reveal How Your Trades Really Behave
Posted: Tue Oct 06, 2026 10:04 am
by PTScalper
How to use this script
1.) Open TradingView and open the Pine Editor tab at the bottom of the screen.
2.) Delete any existing code, paste the code above, and click Save.
3.) Click Add to Chart.
How it works
The Engine: Instead of relying solely on the final profit/loss, the script continuously tracks the highest high and lowest low for every bar while a trade is open.
The Reversal Logic: It automatically detects when a trade flips (e.g., closing a Long to immediately open a Short) and cleanly records the data for the closed trade before resetting the tracker for the new one.
The Dashboard: It draws a dynamic statistics table in the bottom-right corner of your chart. It aggregates the data from the entire backtest, displaying your Average MAE, Average MFE, and the holistic MFE/MAE Ratio in ticks (which translates directly to points/pips depending on the asset).