MACD Trend Following Strategy is a pullback-continuation strategy, not a crossover strategy: it only acts once a trend is already confirmed by both price (above/below the EMA50) and momentum (MACD on the matching side of zero), then waits for a pause in the histogram before re-entering in the trend direction. This page covers the exact entry and exit rules, a real Strategy Tester run of those rules on NZDUSD H1, how the stop and time-stop scale across other pairs and timeframes, and where the rules break down.
For more like this, browse the forex strategy hub.
Strategy overview

MACD Trend Following Strategy trades NZDUSD on the H1 chart. NZDUSD trades thinner than the other majors. Avoid the late New York session.
The trigger is a shrink-then-expand pattern in the histogram, not a fresh cross. That distinction matters: a crossover strategy re-enters the market constantly as MACD oscillates, while this rule set only re-engages a trend that briefly paused and is now resuming – fewer signals, each one closer to an already-moving market.
Tools used
- MACD (12, 26, 9) histogram
- EMA50 trend baseline on the trading timeframe
- Swing structure for the trailing stop
- MT4 and MT5 for chart, alerts, and order placement.
Entry rules

Long entry:
- Confirm the trend: price holds above the EMA50 and the MACD line sits above zero.
- Wait for the histogram to shrink toward zero — a pullback in momentum, not a reversal.
- The trigger is the first bar where the histogram expands again in the trend direction.
- Enter at the open of the next bar. The indicator prints a gold arrow under the trigger bar.
Short entry: Price holds below the EMA50, the MACD line sits below zero, and the histogram resumes falling. The indicator prints a crimson arrow above the bar.
Exit rules

- Trail. Trail the stop behind the EMA50 or behind each new swing low. A trend-following exit rides the move instead of capping it.
- Stop loss. The initial stop sits below the pullback low. On NZDUSD H1 that usually lands 15–35 pips out.
- Time stop. If the histogram flips against the trade and stays flipped for 3 bars, exit at market.
Filters that improve the setup
- Only trade when the EMA50 slope and the MACD zero-side agree. Flat baseline means no trend to follow.
- The indicator waits at least 3 bars between same-side signals.
- Trade the London–NY overlap, when spreads are tight and flow is two-sided.
- Skip entries right before red-folder news for the pair’s currencies.
Worked example
- Price rides above the EMA50 and the MACD line holds above zero. The histogram fades for three bars, then expands again.
- The indicator prints a gold arrow on the expansion bar. You enter at the open of the next bar.
- The stop sits below the pullback low — on NZDUSD H1, typically 15–35 pips from entry.
- You trail behind the EMA50 and exit when a close breaks it.
These numbers are illustrative. They are not a forecast and they are not a promise.
Indicator settings

The download ships with these defaults. Every input is adjustable from the indicator’s settings panel.
| Input | Default | Purpose |
|---|---|---|
| FastEma / SlowEma / SignalPeriod | 12 / 26 / 9 | Standard MACD engine |
| TrendEmaPeriod | 50 | Trend baseline on the trading timeframe |
| RequireZeroSide | true | Longs only above zero, shorts only below |
| MinBarsBetween | 3 | Cooldown bars between same-side signals |
How the rules adapt across pairs and timeframes
The entry and exit logic above does not change from market to market – only the stop distance and the time-stop window scale with each instrument’s own volatility. These are the real per-market figures the rule set uses, not a single copied number:
| Pair | Timeframe | Typical stop | Time-stop window |
|---|---|---|---|
| NZDUSD | H1 | 15–35 pips | about half a trading day |
| XAUUSD | H4 | $7–$15 | about two trading days |
| EURUSD | H4 | 40–80 pips | about two trading days |
| USDJPY | H1 | 15–35 pips | about half a trading day |
Backtest results
We coded the exact entry, exit, filter and time-stop rules above into a rules-testing Expert Advisor (macd_trend_following_backtest_ea.mq4 – not the download package above, which only draws signals) and ran it through the MT4 Strategy Tester on NZDUSD H1, open-price model, fixed 0.01 lots, a $10,000 starting balance, magic-number isolated from any other order. The broker’s own history for this symbol and timeframe covered 2026.03.30 11:00 to 2026.08.18 23:59.
Over that window the rules produced 71 trades, 27% of them profitable, for a net loss of $-17.54 (gross profit $+50.44, gross loss $-67.99, profit factor 0.74). Maximum drawdown over the run was 0.27% of the test balance.
71 trades is a small sample – not enough to draw a firm conclusion about the rules’ long-run edge, only enough to show the exact logic above actually executes as described against real historical price data rather than a hand-picked chart example. Test the rules yourself over a longer window and on your own broker’s feed before risking capital. Results are not guaranteed; past performance is not indicative of future results.
Where this strategy fails
- A trend that pauses and then reverses outright, instead of resuming, will still trigger this entry right before the reversal – the histogram-resume trigger cannot distinguish a pause from the start of a top or bottom.
- In a slow, grinding trend the histogram can hover near zero without a clean shrink-then-expand pattern, so the strategy produces very few signals exactly when a trend-follower would want more of them.
- The EMA50 trail can give back a meaningful chunk of open profit before it closes the trade, since it only tightens and never locks in gains ahead of price.
How this page was verified
The signal indicator behind the download is our own build, compiled for MT4 and MT5 and checked on live charts before release; it draws signals once per closed bar and does not repaint. The Backtest results section above verifies the underlying rule logic separately, against real historical price data, not against the indicator’s chart output.
Download the MACD Trend Following Strategy template
Download the complete MACD Trend Following Strategy package for MT4 and MT5 below. The zip contains the compiled signal indicator for both platforms, a ready chart template for each, a STRATEGY-RULES.txt file with the exact rule list, and a README with install steps.
Download this strategy free
Enter your email and the file is yours. You also get the full MT4 and MT5 library.
You will receive the package by email after a one-step confirmation. If you are new to MetaTrader, follow the step-by-step MT4 and MT5 indicator install guide to load the indicator and the chart template.
FAQ
Why is this a macd trend following strategy, not just a generic setup?
A pullback-continuation strategy, not a crossover strategy: it only acts once a trend is already confirmed by both price (above/below the EMA50) and momentum (MACD on the matching side of zero), then waits for a pause in the histogram before re-entering in the trend direction.
How many trades did the real backtest produce?
On NZDUSD H1, the rules-testing EA logged 71 trades over 2026.03.30 to 2026.08.18 – see the Backtest results section above for the full numbers.
What counts as the histogram ‘resuming’ after a pullback?
The MACD histogram has to shrink toward zero for at least one bar and then expand again on the same side it started from. A histogram that flips sides during the pullback is treated as a trend change, not a pause, and does not trigger an entry.
Why trail behind the EMA50 instead of using a fixed take-profit?
A fixed target caps a trend-following trade at an arbitrary distance. Trailing behind the EMA50 lets a genuine trend run while still giving the position a defined exit the moment price closes back through the baseline.
Can I run this on a different pair or timeframe than shown here?
Yes – the settings-by-pair/timeframe table above shows how the stop distance and time-stop window change across a few real combinations. The core rules (the indicator settings table) stay the same; only the distances scale with the instrument’s own volatility.
Are results guaranteed?
No. Trading involves risk. Results are not guaranteed. Past performance is not indicative of future results. This macd trend following strategy is a rule-based framework, not a signal service; test it and adapt it to your own risk tolerance before using live capital.
Related on forexmt4systems.com: MACD Trend Following Strategy for NZDUSD on M15 · MACD Trend Following Strategy for NZDUSD on H4 · Major Trend Indicator MT4 + MT5.
Authoritative references
- Learn more about the MACD.
- General background on technical indicators.
