A simple MACD strategy buys after a confirmed upward crossover in an established uptrend and sells after a confirmed downward crossover in an established downtrend, with exits planned before entry. Use price structure to confirm the direction, then test the same rules on historical charts and a demo account. Leveraged forex, contracts for difference (CFDs), and binary options are high-risk products; an indicator signal does not make a trade safe.
What a MACD Strategy Can and Cannot Tell You
Moving Average Convergence Divergence, or MACD, compares moving averages to show changes in momentum—the direction and pace of price movement. A moving average smooths price data to make its general direction easier to see.
MACD can help you identify when shorter-term price movement strengthens or weakens relative to the longer-term trend. It provides a repeatable trigger for considering a trade, rather than entering because a chart “looks promising.”
However, MACD uses past prices. It is a lagging indicator, meaning its signals appear after some movement has already happened. It cannot reliably identify the exact beginning or end of a trend.
A crossover also cannot tell you whether the remaining move will cover your trading costs. In a range—a market moving sideways between boundaries—the lines may repeatedly cross without a sustained move. These misleading changes are called whipsaws.
The setup below is a starting point for testing, not a proven profitable system.
Set Up the MACD Indicator
Use closing prices and the conventional settings provided here:
- MACD line: the 12-period exponential moving average minus the 26-period exponential moving average.
- Signal line: a 9-period exponential moving average of the MACD line.
- Histogram: the MACD line minus the signal line.
An exponential moving average, or EMA, gives more weight to recent prices. A period means a chart interval: on a daily chart, each period represents a daily candle. A candle displays the opening, highest, lowest, and closing prices for its interval.
The zero line marks where the fast and slow price averages are equal. MACD above zero means the faster average is above the slower average; below zero means the reverse.
Histogram bars above zero show MACD above its signal line. Bars below zero show it below the signal line. Expanding bars indicate a widening gap; shrinking bars indicate a narrowing gap. Neither guarantees what price will do next.
Keep these settings unchanged during your initial test. Changing them after disappointing trades makes it harder to evaluate the original rules fairly.
Choose if you want a free demo account and a simple interface for short-expiry options.
High risk: most retail traders lose money with CFDs, crypto derivatives and binary options. Check the firm is licensed where you live.
Define the Trend and Trading Conditions
For a concrete version to test, use a daily chart for direction and a 4-hour chart for entry signals. The daily chart supplies context; the entry chart supplies the trigger.
Define a swing high as a completed candle whose high exceeds the highs of the immediately neighbouring candles. A swing low has a low below the lows of its immediately neighbouring candles. A swing becomes confirmed only after the following candle closes.
Apply these conditions:
- Long setup: the latest confirmed daily swing high and swing low are higher than their predecessors, and daily MACD is above zero. A long position seeks to benefit from rising prices.
- Short setup: the latest confirmed daily swing high and swing low are lower than their predecessors, and daily MACD is below zero. A short position seeks to benefit from falling prices.
- No setup: the price structure is mixed, the direction filter fails, or the necessary swings are unavailable.
Use completed daily candles when evaluating the filter. Do not use the eventual daily close to justify an earlier entry.
Skip trades immediately ahead of scheduled announcements capable of moving the currency pair sharply. Before testing, write down which event categories you will exclude and the exclusion window, using an economic calendar. Apply that policy consistently.
Entry Rules: Wait for a Confirmed Crossover
A confirmed crossover is a change in the relationship between the MACD and signal lines that remains present when the entry candle closes.
For a long entry:
- The daily long conditions must pass.
- On the preceding completed 4-hour candle, MACD must be at or below its signal line.
- On the newly completed 4-hour candle, MACD must be above its signal line.
- Enter at the next candle’s opening opportunity, using the actual available execution price.
For a short entry, reverse the conditions: the daily short filter must pass, and MACD must move from at or above its signal line to below it.
Do not enter while the crossover candle is still forming. An apparent cross can disappear before the close.
Take a fresh crossover only when you have no open position in that pair. If the filters fail when the crossover occurs, skip it. Do not enter later merely because the lines remain crossed; wait for a fresh qualifying signal.
Exit Rules: Stops, Targets, and Opposite Signals
A stop-loss is an instruction to close a position when price moves against you to a specified level. A profit target is an instruction to close when price reaches a planned favourable level.
For this test version, place the stop beyond the latest confirmed 4-hour swing low for a long, or swing high for a short. Define any additional buffer before testing and apply it consistently. Skip the trade if no suitable swing exists or the resulting stop is not below the actual entry price for a long position or above it for a short position.
Set the target at a distance consistent with a 1:2 risk-reward ratio: the planned favourable price distance is larger than the distance to the stop by that ratio. This describes the planned payoff relationship, not the likelihood of reaching the target.
Exit when the stop or target executes, or at the next opening opportunity after a completed opposite MACD crossover, whichever happens first. Do not widen the stop to keep a losing trade alive.
Worked example: illustrative numbers
Suppose the daily long filter passes and the 4-hour MACD completes an upward crossover. You enter at the next available opening price.
For illustration only, assume the selected swing-based stop lies 2% below entry. A target 4% above entry gives a planned 1:2 risk-reward ratio before costs.
These percentages illustrate the arithmetic; they are not recommended forex stop distances. Nor does a 2% price move mean risking 2% of your account. The effect on your account depends on position size relative to your funds, trading costs, and the actual exit price; leverage allows greater exposure with less margin.
If an opposite crossover closes before either price exit executes, the rules require an exit at the next opening opportunity. A stop may execute at a worse price than requested during fast movement or a price gap.
Use Confirmation Without Overloading the Chart
The daily direction filter and swing structure already provide confirmation. Keep them as the baseline before adding more indicators.
Support is an area where buying has previously interrupted falling prices; resistance is an area where selling has interrupted rising prices. Nearby opposing structure can make a trade less attractive if it obstructs the planned target. If you add a rule for this, define how you identify those areas and when you reject a trade.
The Relative Strength Index, or RSI, measures the strength of recent price changes. It can provide another perspective, but it also draws on price data. Adding it does not create independent proof that a MACD signal will work.
The histogram is likewise part of MACD, not separate confirmation. Avoid counting the crossover and histogram change as unrelated evidence.
Backtest the Rules and Manage Risk
Backtesting means applying your written rules to historical data as though decisions were made at the time. Record every qualifying signal, including losses and skipped trades.
Include the spread—the difference between quoted buying and selling prices—commissions where applicable, and slippage, which is the difference between the expected and actual execution price. Check the instrument’s contract specifications when calculating position size.
Choose an account loss amount you can tolerate before entry. Then size the position so the estimated loss at the planned stop price, including costs, fits that amount; slippage or gaps can make the actual loss larger. Leverage increases exposure relative to your funds; it does not improve signal quality.
Review net results, average gains and losses, and maximum drawdown—the largest decline from an account peak to a subsequent trough. Win rate alone cannot show whether a strategy is worthwhile.
If historical candles show both stop and target touched but not their order, use more detailed data or a conservative assumption. Do not automatically record a winner.
Check the unchanged rules on data you did not use to develop them, then forward-test on a demo account using new market activity.
Common mistakes
- Acting before the crossover candle closes.
- Trading signals when the trend filter fails.
- Changing settings to make historical losses disappear.
- Ignoring execution costs or increasing size after losses.
- Treating a favourable backtest as a forecast.
Risk warning
Leveraged forex, CFDs, and binary options can cause substantial losses. Binary options have different expiry and payout mechanics, so these stop-and-target rules do not transfer directly. Historical results and demo performance cannot guarantee live outcomes. Risk only money you can afford to lose.
Key takeaways
- Confirm the trend before considering a closed-candle crossover.
- Define the stop, target, and opposite-signal exit before entry.
- Keep confirmation simple and rules consistent.
- Include costs, control position size, and test before risking money.