Key results
- Total return
- -22.1%
- Buy & hold: +55.5%
- Annual return (CAGR)
- -2.5%
- Buy & hold: +4.5%
- Max drawdown
- -25.1%
- Buy & hold: -15.9%
- Win rate
- 32.73%
- Profit factor
- 0.78
- Trades
- 385
- Longest losing streak
- 12 trades
- Period
- Oct 2, 2016 to Oct 1, 2026
- 10 years
- Market
- USD/JPY
- 4-hour
Equity curve vs buy & hold
Returns year by year
| Year | Return | Trades |
|---|---|---|
| 2016 | -0.3% | 9 |
| 2017 | +0.4% | 36 |
| 2018 | -1.6% | 37 |
| 2019 | -3.1% | 26 |
| 2020 | -2.1% | 25 |
| 2021 | -2.7% | 39 |
| 2022 | +3.3% | 45 |
| 2023 | -4.3% | 47 |
| 2024 | -4% | 46 |
| 2025 | -4.6% | 45 |
| 2026 | -5.3% | 30 |
Calendar years, compounded from monthly results. The first and last years can be partial.
Pairing MACD with a 200-period moving average is one of the most common ways to make a momentum indicator "trend aware": only take the MACD signal when price sits on the right side of the 200 EMA. The version we tested follows the setup described in this MACD guide and applies it to USD/JPY on the 4-hour chart, a pair that trended strongly for much of the last decade.
The rules we tested
- Market and timeframe: USD/JPY, 4-hour candles.
- Period: 2 October 2016 to 1 October 2026.
- Long entry: the MACD histogram crosses above zero and the close is above EMA(200).
- Short entry: the MACD histogram crosses below zero and the close is below EMA(200).
- Stop-loss: 160 pips.
- Trailing stop: 100 pips. There is no fixed profit target.
- Exit: the stop, the trailing stop, or an opposite entry signal, which closes the trade and reverses the position.
- Costs and sizing: 0.02% commission per side, full position size on a 10,000 starting balance.
What the backtest shows
The result is a slow, steady loss. The strategy ended at -22% (-2.5% a year) while holding USD/JPY returned +56%. Worse, its maximum drawdown was 25.1%, deeper than the 15.9% of buy and hold. On every count that matters here, the filtered MACD did worse than doing nothing clever at all.
The trade profile explains why. Of 385 trades, 327 ended on the trailing stop, 47 on an opposite signal and 11 on the hard stop. The average win was 0.68% and the average loss 0.43%, a payoff of about 1.6 to 1. At a 33% win rate, that combination loses money: the profit factor is 0.78.
Only two years finished positive, 2017 (+0.38%) and 2022 (+3.32%), and neither by much. Every year from 2023 onward lost between 4.01% and 5.25%, with 2026 counted up to 1 October.
Commissions are a big part of the story. 385 round trips at 0.04% each add up to roughly 15% of the position size, which is most of the ten-year loss. The signal itself was only slightly negative, and costs turned a small leak into a clear loss.
A filter is not an edge
The 200 EMA keeps you on the side of the trend, which sounds safe. But if the entry signal has no edge of its own, the filter only decides which direction you lose in.
Why it doesn't work here
A MACD histogram zero cross is a fast signal. On a 4-hour chart it flips often, including inside trends, so many entries are taken on small pullbacks that end quickly. The 100-pip trailing stop then closes the trade on the first normal retracement. USD/JPY trended hard in 2022, but it trended in long legs with deep pauses, and a tight trailing stop keeps getting shaken out of those legs. The result is many small wins and many small losses, with costs tipping the balance.
What you could test next
- Use the MACD line crossing zero instead of the histogram, a slower signal that fires less often.
- Widen the trailing stop, or replace it with an exit on the opposite histogram cross, to let trend legs breathe.
- Move the same rules to the daily chart, where each signal carries more weight and costs matter less.
- Keep only the long side, since USD/JPY rose over the decade (+56% buy and hold), and check whether the short entries were the main drag.
Methodology and assumptions
- Starting capital
- 10,000
- Position size
- 100% of equity
- Commission
- 0.02% per side
- Data window
- Oct 2, 2016 to Oct 1, 2026
- Run date
- October 2, 2026
- No repainting: every signal is computed on closed candles only, so the backtest never acts on a price a trader could not have seen yet.
- Past performance does not predict future results. A backtest is a historical simulation, not a forecast.
Frequently asked questions
What are the rules of the MACD 200 EMA strategy?
Buy when the MACD histogram crosses above zero while the close is above the 200-period EMA. Sell short when the histogram crosses below zero while the close is below the 200 EMA. In this test the trade is protected by a 160-pip stop and a 100-pip trailing stop.
Why does the 200 EMA filter not save the MACD signal here?
The filter keeps trades on the side of the long-term trend, but the entries themselves were weak. Most trades were closed by the 100-pip trailing stop, with an average win of 0.68% against an average loss of 0.43%, which is not enough at a 33% win rate.
Is the MACD histogram cross the same as a MACD signal line cross?
Yes. The histogram is the MACD line minus its signal line, so the histogram crosses zero exactly when the MACD line crosses the signal line.
How much did commissions cost in this MACD backtest?
385 round trips at 0.02% per side add up to roughly 15% of the position size over ten years, which is a large share of the -22% result.
Reproduce it, then change it
Every number on this page comes from the Backtrex engine. Rebuild the strategy in the app, then change the market, the timeframe or a parameter and see whether the result holds.
Ready to backtest your strategies?
Create your free account and take the guided tour: a real 10-year backtest in 3 minutes, no coding, no credit card.
Create your account in 30 seconds and run your first backtest. No credit card.
Other backtests
- Strategy
- -68.6%
- Buy & hold
- +55.9%
- Strategy
- +26.9%
- Buy & hold
- +528.3%
- Strategy
- +18.1%
- Buy & hold
- +255.4%
- Strategy
- +14.4%
- Buy & hold
- +136.7%