Momentum
MACD Indicator on a Live Gold Chart
The MACD subtracts a slow moving average from a fast one. The line moves away from zero as the two averages pull apart and comes back toward zero as they close in. A signal line and a histogram sit on top. Because it is measured in price units, on gold the MACD reads in dollars: the distance between two averages of the gold price.
What it shows
Three things in their own pane: the MACD line, the Signal line, and the Histogram as columns that show MACD minus Signal. A zero line runs across. The columns take one of four shades: rising above zero, falling above zero, rising below zero, falling below zero.
How Pravex works it out
- Two averages of the source: a fast one over 12 candles and a slow one over 26. With the default EMA type each new value is alpha × new price + (1 − alpha) × the old value, with alpha = 2 ÷ (length + 1) and the first value a plain average.
- MACD = fast average − slow average. It sits above zero while the fast one is higher.
- Signal = an average of the MACD line over the signal average length, 9 candles by default, using the average type picked for the signal.
- Histogram = MACD − Signal. Each column is coloured by whether it is above or below zero and whether it is bigger or smaller than the column before.
Settings
| Setting | Default | What changing it does |
|---|---|---|
| Source | close | The price both averages are taken from. hl2 lets the wicks count; close keeps the MACD tied to where each hour settled. |
| Quick average length | 12 | How many candles the fast average covers. A shorter length makes the MACD react sooner and cross zero more often. |
| Slow average length | 26 | How many candles the slow average covers. A longer length widens the gap and slows the line. |
| Signal average length | 9 | How many MACD values the signal average covers, from 1 up to 50. A bigger number makes the Signal slower, so the MACD line crosses it less often. |
| Average type for the two lines | EMA | The kind of average used for the fast and slow lines: EMA or SMA. SMA treats every candle in the window equally and reacts more slowly to the newest ones. |
| Average type for the signal | EMA | The kind of average used for the Signal line: EMA or SMA. |
How traders read it
The first thing people watch is the MACD against the Signal. When the MACD crosses above the Signal the histogram turns positive, which says the gap between the fast and slow averages has started widening upward. A cross below does the opposite.
The zero line carries its own meaning. MACD above zero means the fast average is higher than the slow one; below zero, lower. A move through zero is the same event as the two averages crossing on the price chart.
The histogram shows the speed of that change. Shrinking columns while the MACD is still above zero say the lead of the fast average is fading, which often shows up before the lines themselves cross.
When it misleads
Both averages follow price, so every MACD signal arrives after the move has begun. In a sideways stretch of gold the MACD hugs zero, crosses its Signal over and over, and each cross loses a little. The line also has no fixed scale: a reading of 3 means something different on 5-minute candles than on daily ones, so levels cannot be compared across charts or timeframes.
Questions and answers
What do the MACD, Signal and Histogram mean?
The MACD is the fast average minus the slow average. The Signal is an average of the MACD. The Histogram is the MACD minus the Signal, drawn as columns around zero.
Does 12, 26, 9 still work on gold?
It is the Pravex default and the widely published set the MACD is usually shown with, so it is a fair place to start. Halving all three (6, 13, 5 as an example) makes the crosses come sooner and far more often; doubling them leaves only the larger swings. The numbers matter less than keeping the fast one well below the slow one.
Why is the MACD called a lagging indicator?
It is built entirely from moving averages of past prices, so it can only move after price has moved. The Histogram, being the difference of two of them, tends to turn a bit sooner than the crosses.
Why are some MACD columns light and some dark?
Each column is shaded by two things: its side of zero and whether it grew in size against the column before. A deep green column is above zero and growing; a pale green one is above zero but shrinking. Below zero, a growing column is strong red and a shrinking one pale red.
Related: Relative Strength Index, Stochastic, Moving Average Exponential, Awesome Oscillator, every indicator.
Not financial advice. Read our disclaimer.
Pro charts. Zero paywalls.
Charts for gold, oil, US indices and crypto, with every tool free to use.
Open the chartNo card, no trial, no upgrade pop-ups.