MACD Indicator Explained: Signals, Settings and Mistakes
The MACD indicator explained: how 12, 26 and 9 build the line, signal and histogram, how to read crossovers and divergence, and why it always lags.

The MACD indicator has three moving parts, two lines and a row of bars, and the rule beginners usually learn first is to buy when the lines cross up. That rule works beautifully in hindsight and badly in sideways markets.
Quick answer: The MACD indicator measures momentum by subtracting a 26-period EMA from a 12-period EMA. That difference is the MACD line; its 9-period EMA is the signal line; the gap between them is the histogram. Crosses and divergence describe momentum changing, but MACD is built from averages, so it always reacts after price.
What is the MACD indicator?
MACD stands for moving average convergence divergence. It was developed by the analyst Gerald Appel in the late 1970s, and it is an indicator in the plainest sense: a calculation made from past closing prices and drawn in a panel under the chart. The name describes what it watches. Two moving averages of price, one fast and one slow, are always either drawing closer together (converging) or moving apart (diverging). MACD measures the distance between them.
A fast average follows recent prices closely; a slow one trails behind. When price accelerates, the fast average pulls away from the slow one and the gap widens. When the move slows, the fast average stops pulling away and the gap starts to shrink, even while price is still rising. So the gap measures momentum: how hard price has been pushing lately, and whether that push is growing or fading.

The indicator has three parts:
- The MACD line: the 12-period EMA minus the 26-period EMA.
- The signal line: a 9-period EMA of the MACD line, a slower copy of it.
- The histogram: bars showing the MACD line minus the signal line.
Appel’s original version had only the two lines; the histogram was added in the mid-1980s by Thomas Aspray. Platforms differ in how they draw it: the built-in MACD in MetaTrader 4, for example, shows the MACD line itself as bars and leaves out the histogram, so check what your bars actually represent. The chart below shows all of it on illustrative EUR/USD prices, with the two averages drawn on the price panel so you can see where the lower panel comes from.
Read the two panels together. In the flat stretch on the left, the averages overlap and the MACD line hugs zero. As the rally starts, the 12 EMA pulls above the 26 EMA and the MACD line climbs. On the second push, price makes a slightly higher high but the averages are closer together, so the MACD line peaks lower. Then the fast average drops through the slow one, and the MACD line falls through zero. Every reading in the lower panel is the upper panel’s averages, redrawn as one line.
The Academy lesson Indicators 101 places MACD alongside moving averages and RSI, and our guide to moving averages in forex explains the EMA itself in detail.
How MACD is calculated: 12, 26 and 9
Your platform calculates MACD instantly, so you never need to do it by hand. Doing it once, though, explains almost every quirk of the indicator. There are five steps:
- Calculate a 12-period EMA of the closing prices: the fast average.
- Calculate a 26-period EMA: the slow average.
- Subtract: MACD line = 12 EMA − 26 EMA.
- Calculate a 9-period EMA of the MACD line: the signal line.
- Subtract again: histogram = MACD line − signal line.
Every EMA updates with the same rule: new EMA = previous EMA + k × (close − previous EMA), where k = 2 ÷ (n + 1) and n is the period. For MACD’s three averages, k is 2 ÷ 13 ≈ 0.154 for the 12-period, 2 ÷ 27 ≈ 0.074 for the 26-period and 2 ÷ 10 = 0.2 for the 9-period signal line. In words: each new close drags the fast average about 15% of the way towards it, the slow average about 7%, and the signal line moves a fifth of the way towards the latest MACD value.
One more detail matters later. Because MACD is the difference between two prices, it is measured in price. On EUR/USD a reading of 0.0020 means the fast average is 20 pips above the slow one; on USD/JPY the same 20-pip gap reads 0.20. So MACD has no fixed top or bottom, and its readings cannot be compared from one pair to another. The worked example runs two days of the calculation with small, round numbers.
Platforms have to start each EMA somewhere, usually from the first close or a simple average of the first few, so two charts can show slightly different MACD values at the start of the data. After a few dozen candles the difference fades away.
Reading the MACD histogram
The histogram is the gap between the MACD line and the signal line, drawn as bars. When the MACD line is above its signal, the bars sit above zero; when it is below, they hang underneath. Their height is the size of the gap. The figure below draws the gap twice, once as shading between the two lines and once as bars, so you can see they are the same thing.
Because the signal line is an average of the MACD line, it trails behind it. While momentum is accelerating, the MACD line runs away from its average and the bars grow. The moment momentum stops accelerating, even if price is still rising, the MACD line stops running away and the bars start to shrink. That makes the histogram the earliest part of MACD to turn. In the chart above the bars peaked eight candles before price made its high, and shrank steadily until the lines crossed.
A simple way to hold the three parts in your head: price is where the market is, the MACD line is roughly how fast it is moving, and the histogram is whether it is speeding up or slowing down. Shrinking bars mean slowing, not reversing.
That is also the histogram’s weakness. Every pause in a trend shrinks the bars, and most pauses are just pauses. Treat a shrinking histogram as a reason to pay attention, never as a reason to act on its own. The playground below draws MACD on a longer illustrative series. It opens on MACD with the period slider locked, because MACD uses its three fixed periods; tap EMA afterwards to see the kind of average it is built from.
The MACD indicator on an illustrative EUR/USD series: the MACD line, the signal line and the histogram under the price. Watch the bars shrink as each swing loses pace, and flip colour every time the two lines cross.
MACD crossover signals: signal line and zero line
MACD produces two kinds of crossover, and they mean different things.
A signal-line crossover is the MACD line crossing its signal line, which is the same moment the histogram changes sign. A cross upwards is read as momentum turning up; a cross downwards as momentum turning down. These are the fast, frequent signals.
A zero-line crossover is the MACD line crossing zero. Since MACD is the 12 EMA minus the 26 EMA, it crosses zero at exactly the moment the 12 EMA crosses the 26 EMA. A zero-line cross is a moving average crossover, redrawn. It is slower and rarer, and it describes the trend of the averages rather than a short swing.
Where a signal-line cross happens matters as much as the cross itself. A bullish cross below zero happens while the fast average is still under the slow one: it is a bounce inside a down-move, or at best the very start of a turn. A bullish cross above zero agrees with the averages. Many traders only take signal-line crosses on the matching side of zero, buys above it and sells below it, which turns the zero line into a simple trend filter.
Both crosses arrive after price has already turned, and the chart below shows by how much.
That lag is not a fault to be fixed. MACD is an average of the difference between two averages, so it cannot react to a candle until that candle is part of its sums. Faster signals are possible, but only by giving up smoothness, as the settings section shows.
The bigger problem is sideways markets. In a range, the two averages wrap around each other, the MACD line hugs zero and the lines cross every few candles. In the flat stretch at the left of the first chart, the lines crossed three times in under 20 candles while MACD never moved more than 2 pips from zero. Each of those was a textbook crossover and none of them meant anything. Our guide to how to identify a trend shows how to tell a trending market from a range before you look at MACD at all.
Try reading a crossover in context. The chart below stops on the candle where MACD crossed below its signal line after a strong rally.
EUR/USD has rallied more than 130 pips. On the last candle, the MACD line crossed below its signal line, but both are still far above zero (about 27 and 29 pips). What is the most sensible reading?
Illustrative EUR/USD closes. MACD values quoted are a standard 12, 26, 9 MACD of this series, in pips.
MACD divergence and why it often fails
Divergence is when price and MACD disagree. In a bearish divergence, price makes a higher high but MACD makes a lower high. In a bullish divergence, price makes a lower low but MACD makes a higher low. Always compare MACD at matching swing highs and lows, not at random points on the chart.
The first chart in this article contains one. Price’s second high at 1.0967 was about 20 pips above the first at 1.0948, yet the MACD line peaked at about 19 pips the second time, against more than 32 pips the first. The second push was slower, so the fast average never pulled as far from the slow one.
Divergence means the latest move had less force than the one before. It does not mean the move is over, and it says nothing about when price will turn. In a strong trend, momentum often fades in stages while price keeps going, so divergence can appear three or four times in a row before anything happens.

So treat divergence as a warning. Sensible responses are defensive: do not add to the position, consider moving a stop to a tighter level, and wait for price itself to confirm a change, such as a break of the last swing low in an uptrend. If you sell every divergence in a strong trend you will be early, repeatedly. Our guide to the RSI indicator covers RSI divergence, which behaves the same way, and seeing both together is a common source of confirmation bias: two indicators built from the same closes agreeing still count as one opinion.
How to use MACD with trend, levels and candles
MACD earns its place when it agrees with things it cannot see: the market’s structure, a price level and the candles at that level. Traders call that agreement confluence. The cleanest way to use MACD is to let price set up the trade and let MACD answer one question: is momentum backing this idea or fighting it? Step through the chart below.
Using the MACD indicator with structure: price breaks above 1.0850, MACD stays above zero through the pullback, and the histogram stops falling as a hammer forms at the old ceiling. Illustrative prices; MACD values are a standard 12, 26, 9 MACD of a longer history of this series.
The trend and the level came from price, and the hammer showed buyers acting at the level. MACD contributed two things: the zero line said the larger momentum was still up, and the histogram showed the pullback losing force. Waiting for the bullish signal-line cross would have meant buying 50 pips higher, close to the target. The lesson on support and resistance shows how to draw the level, and our guide to support and resistance in forex covers broken levels changing role.
The stop loss and size come from the chart, never from MACD. The stop goes where the idea is proven wrong, below the wick and the level, and the position size follows from that distance and a fixed risk per trade. The Academy lesson on stop-loss placement and our guide on where to place a stop loss cover the exit side in full.
A second combination works well: read MACD on a higher timeframe for direction and a lower one for timing. A daily MACD above zero sets the bias; a four-hour pullback to a level gives the entry. The lesson on multi-timeframe analysis shows the method. When ESMA restricted retail CFDs in 2018, it cited evidence that 74% to 89% of retail accounts lose money, and no indicator changes those odds on its own.
MACD settings: is 12, 26, 9 still the right choice?
The 12, 26 and 9 periods are the ones Appel used, and they have stayed the default on almost every platform for decades. They are a convention, not a discovery. Changing them changes MACD’s character in a predictable way: shorter periods make it faster and noisier, longer periods make it smoother and later. The figure counts the signal-line crosses on the same prices under three settings.
| Setting | How it behaves | The trade-off |
|---|---|---|
| 6, 13, 5 (faster) | Reacts within a candle or two of a turn | Many more crosses, many of them whipsaws |
| 12, 26, 9 (default) | Balanced; what nearly everyone else sees | Lags a few candles behind every turn |
| 24, 52, 18 (slower) | Smooth, crosses rarely | Signals arrive long after the move has started |
For most people the right answer is to leave the defaults alone and change the chart instead. MACD on a daily chart is already slower than MACD on a one-hour chart, because each period covers more time. If you do change the settings, change them once, for a reason you can write down, and then test them over a long stretch of history, not the last few weeks. Adjusting the periods until they would have caught the last three turns is curve-fitting: the settings end up describing the past perfectly and the future no better than before. Our guide to forex timeframes explains how the chart period changes every indicator on it.
MACD vs RSI: which should you use?
MACD and RSI are both momentum indicators built from closing prices, so they often tell the same story. The difference is the scale. RSI divides average gains by average losses and squashes the result between 0 and 100. MACD subtracts one average from another and leaves the answer in price. That one difference shapes how each behaves in a strong trend.
Once RSI is above 70 it has little room left to show that a trend is getting stronger. MACD has no ceiling, so it keeps measuring how far the fast average has pulled ahead. On the other hand, MACD’s open scale means it has no built-in overbought or oversold levels, and a reading of 0.0030 tells you nothing until you compare it with the same pair’s recent history.
| MACD | RSI | |
|---|---|---|
| What it measures | Gap between the 12 and 26-period EMAs | Average gains against average losses |
| Scale | Price units, no limits, centred on zero | 0 to 100 |
| Overbought and oversold | None built in | 70 and 30 by convention |
| Main readings | Crossovers, zero line, divergence | Extremes, the 50 line, divergence |
| Most useful in | Trending markets | Ranges and pullbacks |
| Weakest in | Ranges, where it whipsaws | Strong trends, where it sticks at extremes |
So the choice depends on the market more than on the indicator. If you mostly trade trends and pullbacks, MACD’s zero line and histogram fit naturally. If you mostly trade ranges, RSI’s fixed scale is easier to read. What does not help is using both and waiting for them to agree, because they are built from the same closes. Pick one momentum indicator, learn its habits well, and spend the rest of your attention on price.
Common MACD mistakes
Trading every crossover
Most signal-line crosses are noise, especially in ranges, where the lines cross every few candles. A crossover is a description of the last few candles, not an instruction. Ask what kind of market you are in first.
Ignoring which side of zero the cross happens on
A bullish cross far below zero is a bounce in a down-move; a bearish cross far above zero is usually a pullback in an up-move. Reading every cross the same way throws away the most useful thing MACD tells you: the direction of the larger momentum.
Treating divergence as a reversal signal
Divergence says a move has lost force. In strong trends it can repeat several times before anything turns. Use it to manage an open trade more carefully, and let price confirm before you act against the trend.
Comparing MACD readings across pairs or years
Because MACD is measured in price, 0.0030 on EUR/USD and 0.30 on USD/JPY are both 30 pips, and a 30-pip reading means something different in a calm month than in a volatile one. Compare MACD only with its own recent history on the same pair and timeframe. If what you really want to know is how much a pair is moving, use a tool built for that, such as the ATR indicator.
Letting MACD set the stop or the size
MACD has no idea where your trade is wrong. The stop belongs at a level on the price chart, and the size comes from the stop distance and your risk per trade. Record which MACD readings you acted on in a trading journal, and after fifty trades you will know whether it is helping you or just keeping you busy.
Frequently asked questions
What is the MACD indicator used for?
MACD is used to read momentum: whether recent price movement is speeding up or slowing down, and in which direction. Traders use its zero line as a trend filter, its signal-line crossovers and histogram for timing, and divergence as a warning that a move is losing force. It works best as confirmation of what price is already showing.
What are the best MACD settings for forex?
There are no best settings. The default of 12, 26 and 9 is used on almost every platform, which makes it a sensible standard. Shorter settings react sooner but give more false signals; longer ones are smoother but later. Most traders get more from changing the chart timeframe than from changing the periods.
Is MACD a leading or lagging indicator?
MACD is a lagging indicator. It is built from moving averages of past closes, and its signal line is an average of those, so every crossover happens after price has turned. The histogram turns earliest, because it measures whether momentum is accelerating, but even that is a description of candles that have already closed.
What does it mean when MACD crosses above zero?
When the MACD line crosses above zero, the 12-period EMA has just crossed above the 26-period EMA. It means short-term prices have moved above the longer-term average, which many traders read as upward momentum taking over. It is the same event as a moving average crossover, so it is slow, and in a range it can whipsaw.
Is MACD better than RSI?
Neither is better; they suit different markets. MACD has no ceiling, so it keeps measuring momentum in a strong trend, which makes it useful for trends and pullbacks. RSI is fixed between 0 and 100, which makes its readings easier to judge in ranges. Using both rarely adds much, because both are calculated from the same closing prices.
Free course
Learn this step by step
“Reading Price Charts” is a free BrokerCut Academy course: 10 short lessons (about 80 minutes), quizzes, interactive tools and a certificate when you finish.
Enrol free


