The MACD with an EMA 200 filter is one of the most repeated strategies on the internet. In videos it’s presented as “the simple strategy for beginners”: the price is above the 200 average, the MACD crosses its signal line below zero, you buy. It sounds logical: you trade with the trend and enter on the pullback. I coded a robot for MetaTrader 5 and ran it over 72 months of history on seven instruments. The classic didn’t win on any of them. But a reworked version passed the forward test on gold. All the numbers are below; the robot is at the end of the article.

The strategy rules
The MACD was created by Gerald Appel in the late 1970s: it is the difference between two exponential moving averages (12 and 26) plus a signal line, which is the 9-bar average of that difference. The EMA 200 filter is a popular add-on that is supposed to eliminate trades against the trend. The classic version, the one repeated on forums and in videos:
- Buy. Price closed above the EMA 200, the MACD line crossed the signal line from below to above, and the cross happened below zero (that is, during a pullback).
- Sell. The opposite: price below the EMA 200 and a cross from above to below, above zero.
- Stop at 2 ATR from the entry, take profit at 1.5 times the stop.
- Position size is calculated so that the stop costs 1% of the deposit.
- Timeframe: D1.
By its logic it is a trend system, like the “golden cross”, except that it enters on the pullback rather than on the crossover of the averages.
What it looks like on the chart
Below are two real trades from the robot, taken from the gold H4 test with the optimized parameters.

Winning trade. On October 17, 2024, the H4 price is above the EMA 300 (yellow line) and, at the close of the four-hour candle, the MACD line (8, 20) crosses the signal line (5) upward. The robot buys at the open of the next candle at 2692.35. Stop at 4 ATR (2646.55), take profit at two stops (2783.96). Price never reached the target: on October 21 the MACD crossed the signal downward and the robot closed at 2723.52: +$62.

Losing trade. On October 8, 2024, the same condition: price above the EMA 300, a bullish MACD cross, buy at 2645.99. But the cross happened with an almost flat MACD, in the middle of noise, and the first candle after entry collapsed. The MACD turned immediately and the robot exited at 2609.01: −$37. It didn’t have to reach the wide stop (2584.12): the exit on the reverse cross cut the loss earlier.
To do it manually: open H4, add the EMA 300 and the MACD with parameters 8, 20, 5, wait for the close of the candle in which the MACD crosses the signal upward above the EMA, and buy at the open of the next one.
How I ran the test
- MetaTrader 5 Strategy Tester, FxPro demo server: the broker’s real quotes, spreads and swaps.
- Period from October 2020 to September 2026, exactly 72 months. $10,000 deposit, 1:100 leverage, 1% risk per trade.
- “1 minute OHLC” mode, the closest to reality among the fast tester modes.
I’ll explain at the end why 72 months and not 10 or 20 years. The scheme is the same as in all my analyses: the classic without adjustments → optimization using only 10/2020–09/2024 → verification on 10/2024–09/2026, months the optimizer never saw.
Block 1. The classic over 72 months: zero in every market

| Instrument (D1) | Result over 72 months | Profit factor | Max. drawdown | Trades | Swaps |
|---|---|---|---|---|---|
| USDCHF | +$31 | 1.03 | 5.0% | 21 | −$309 |
| USDJPY | +$20 | 1.02 | 5.1% | 17 | +$34 |
| GBPUSD | −$14 | 0.99 | 8.1% | 26 | −$82 |
| BITCOIN | −$184 | 0.89 | 6.2% | 32 | −$264 |
| WTI (oil) | −$240 | 0.77 | 8.8% | 15 | −$449 |
| GOLD | −$435 | 0.66 | 5.4% | 19 | −$339 |
| EURUSD | −$521 | 0.54 | 6.7% | 17 | −$106 |
No instrument works. The best result is +$31 in six years on $10,000, which is to say, nothing. Why?
- There are almost no signals. Three conditions at once (trend, cross and “below zero”) coincide on the daily chart 2–5 times a year. On gold, over the last 24 months the classic made only 3 trades, and all three together ended up negative.
- The “below zero” filter eliminates the best entries. In a strong trend the MACD almost never drops below zero: the pullbacks are small. The strategy waits for a deep pullback and usually gets it right before the reversal.
- A 2 ATR stop and a take profit of 1.5 stops on D1 are a bet on a short move, and the daily trend only pays those who hold the position for a long time.
- Swaps. On oil and the franc they took more than the strategy managed to earn.
Winning trades range from 29% to 48%. With a take profit of 1.5 stops you need 40% to break even, so there is almost no margin.
Block 2. Optimization with 10/2020–09/2024
Since there are few signals on D1, I moved the strategy to H4 and optimized it on two markets: gold, with strong trends, and USDJPY, where the classic came closest to zero. I adjusted the MACD periods, the EMA filter length (from 0 to 300), the “below zero” condition, sells, the stop, the take profit and the exit on the reverse cross.
- GOLD H4: of the sets with more than 25 trades, 67 were profitable in training and of those 58 stayed positive in the forward test.
- USDJPY H4: 243 were profitable in training and 165 survived in the forward test. But in the best sets the forward profit factor fell to 1.1–1.4 and the drawdown rose to 16–23%. The training period coincided with a huge rise of the dollar against the yen, and the optimizer simply fitted itself to it.
I chose gold. And not the most profitable set, but one from a “cluster” of neighboring variants that are all positive, both in training and in the forward test (a take profit of 1.5, 2 and 2.5 stops gives similar results):
| Parameter | Classic | Optimization (GOLD H4) |
|---|---|---|
| Timeframe | D1 | H4 |
| MACD | 12, 26, 9 | 8, 20, 5 |
| Trend filter | EMA 200 | EMA 300 |
| Cross “below zero” | required | not needed |
| Direction | buys and sells | buys only |
| Stop | 2 ATR | 4 ATR |
| Take profit | 1.5 stops | 2 stops |
| Exit on reverse cross | no | yes |
In short, the optimizer said: faster MACD, wider stop, don’t wait for a deep pullback, and don’t sell gold.
Block 3. Forward 10/2024–09/2026

| Variant | Period | Result | Profit factor | Max. drawdown | Trades |
|---|---|---|---|---|---|
| Classic D1 | 10/2020–09/2024 | −$7 | 0.99 | 3.0% | 16 |
| Classic H4 | 10/2020–09/2024 | −$783 | 0.81 | 14.4% | 75 |
| Optimization H4 | 10/2020–09/2024 | +$874 | 1.33 | 3.7% | 219 |
| Classic D1 | 10/2024–09/2026 (forward) | −$428 | 0.18 | 5.4% | 3 |
| Classic H4 | 10/2024–09/2026 (forward) | −$570 | 0.74 | 12.2% | 36 |
| Optimization H4 | 10/2024–09/2026 (forward) | +$1,652 | 1.68 | 5.5% | 159 |
Each period was tested separately, starting with $10,000. What you can see:
- The optimization passed the forward test. +$1,652 in 24 months with a profit factor of 1.68, on data the optimizer never saw. Over the full 72 months: +$2,548, profit factor 1.49, drawdown of no more than 5.1% and 378 trades.
- The classic, in those same months, lost, both on D1 and on H4. The difference isn’t luck, it’s the rules: a fast MACD without the “below zero” condition manages to get into the trend, and a wide stop doesn’t get knocked out by noise.
- It’s stable: 58 of the 67 sets that were profitable in training stayed positive in the forward test, that is, 87%.
- Costs are noticeable: before swaps and commissions the robot earned $3,340; swaps took $746.

The risks, no sugarcoating
- The forward period coincided with a strong rise in gold. The robot only buys. If gold enters a long decline or a range, it will sit idle below the EMA 300 or keep adding up small losses.
- It’s not the strategy from the videos. The classic MACD + EMA 200 doesn’t work anywhere in my test. A reworked version works, and only in one market.
- Modest returns. About +$400 a year on $10,000 with 1% risk. It’s not a robot for growing an account quickly.
- USDJPY is an example of a trap. In training there were sets with +$11,000, and in the forward test they barely stayed positive. A pretty number in the backtest means nothing without the forward test.
Where to run the robot
The robot works on MetaTrader 5 with any broker that offers gold (GOLD/XAUUSD). My test was run on FxPro. The other brokers in my ranking also work: RoboForex and Tickmill. Before launching it, compare gold swaps: over this holding period they take a notable part of the profit.
Download the “MACD + EMA 200” robot for free
The robot is free for clients of the brokers in my ranking:
- Open a MetaTrader 5 account with one of the brokers above (or use the one you already have).
- Go to the Telegram bot with the button and send your account number.
- After verification, the bot sends you the file: the robot, the classic MACD + EMA 200 parameters and the ones optimized for GOLD H4, plus instructions.
📊 Download the robot for free on Telegram
My conclusion
MACD + EMA 200 is a good example of how a “logical” strategy from videos falls apart at the first honest test. Three filters in a row sound like safety, but in reality they choke the signals: on the daily chart, the classic didn’t win in 72 months in any of the seven markets.
But the idea itself, entering with the trend when the MACD turns, isn’t dead. On gold H4, a fast MACD with a wide stop and buys only passed the forward test, and so did 87% of the neighboring sets. If you keep optimizing the robot consistently, you can keep it in shape: the optimized .set shows what result that approach gives. And that’s better than believing that a classic from the 1970s will feed you on its own in 2026.
Today I also published the analysis of the inside bar breakout, which also found its money on gold. Other trend analyses: the 50/200 “golden cross”, the Turtles and Connors’ RSI-2, with the same 200-average filter.
Why 72 months?
The market changes fundamentally every 3–5 years: other participants arrive, and volatility and the duration of trends and ranges change. You can see it even in this test. In 2020–2023 gold spent a long time in a wide range and the MACD’s trend logic gave almost nothing. Since 2024 gold has entered a strong trend, and the same logic started to pay. A strategy tested over 10–20 years mixes several different markets into a single figure, and that figure says nothing about today’s market. That’s why, when the market changes, you have to change the strategy, not wait for it to “come back.”
I look for strategies for the current market in my app “Find your strategy”, in the browser or on Telegram. There you can test any idea on up to 72 months of history, and every 2 weeks the app automatically runs tens of thousands of strategies and shows you the ones that work over the last 6, 12 and 36 months. It’s not a guarantee of profits, but it is an honest answer to the question “does this work now?”
Backtesting results do not guarantee future results.
Sources
- Gerald Appel — “Technical Analysis: Power Tools for Active Investors”, 2005 (creator of the MACD).
- Own tests in MetaTrader 5 on the FxPro demo server, October 2026.
Where to trade
These are the brokers and exchanges I use that work with clients from Latin America. Always check that the service is available in your country and start small.
Risk warning: CFDs, Forex and crypto derivatives carry a high risk of losing money due to leverage. This article is not investment advice.



