Part 2: The indicators one by one · Chapter 4 of 14 · 9 min

The MACD: crossovers, zero line and histogram

The MACD formula, what price does after the crossover with the signal and after the zero-line cross (with four parameter sets) and an always-in-the-market system: the total goes from −216 to +862 dollars per ounce by changing only the parameters, and chance equals it in 22-59% of trials.

The formula

The MACD (Moving Average Convergence Divergence) has three parts. The line is the difference between a fast and a slow EMA, usually 12 and 26 periods. The signal is a 9-period EMA of the line. The histogram is the difference between the line and the signal. The line is above zero when the fast average is above the slow one. It is used three ways: the crossover of the line with the signal (the histogram changes sign), the zero-line cross (the two averages cross) and the state (the line above or below zero).

The MACD is a difference of averages: it inherits the delay of chapter 1 (on a real low, the crossover came four candles later) and adds no new information compared with the two EMAs.

A sideways period

Figure 1 shows the MACD (12, 26, 9) on H4 from 4 to 18 September 2026, in a period with no direction. The crossovers with the signal flip the system eight times in twelve days. The long of 2 September at $4,395.56 closes on 5 September at 4,438.60 (+42.74 dollars per ounce, the 0.30 cost included). Then: a short until 8 September at 4,441.75 (−3.45), a long until 04:00 the same day at 4,396.75 (−45.30, four hours), a short until 9 September at 4,402.12 (−5.67), a long until 10 September at 4,369.81 (−32.61), a short until 12 September at 4,355.82 (+13.69), a long until 14 September at 4,315.26 (−40.86), a short until 16 September at 4,332.07 (−17.11). One gain, two, and six small losses.

Figure 1. The MACD in a sideways period: eight crossovers in twelve days, with trades from −45.30 to +42.74 dollars per ounce, mostly losses.Data: gold, XAUUSDT perpetual future (real candles) · 4 hours (H4) · from 4 Sept 2026 00:00 UTC to 18 Sept 2026 00:00 UTC.
Read the chart in words

H4 gold chart from 4 to 18 September 2026 and, below, the MACD (12, 26, 9) with a black line, a dashed pink signal and a grey histogram. Labels mark the crossovers and the result of each trade.

WhenWhatPrice
5 Sept 2026 16:00 UTCdown: trade +43 $4,435.64
8 Sept 2026 00:00 UTCup: trade −3 $4,444.09
8 Sept 2026 04:00 UTCdown: trade −45 $4,394.51
9 Sept 2026 12:00 UTCup: trade −6 $4,437.54
10 Sept 2026 12:00 UTCdown: trade −33 $4,328.91
12 Sept 2026 00:00 UTCup: trade +14 $4,358.39
14 Sept 2026 04:00 UTCdown: trade −41 $4,312.86
16 Sept 2026 00:00 UTCup: trade −17 $4,346.46

Times in UTC.

One large gain, and two large losses

Figure 2 shows the opposite case, in March. The short of 18 March at 08:00 at $4,933.32 closes on 22 March at 00:00 at 4,497.25: +435.77 dollars per ounce, the system's best trade. The crossover that closes it opens a long at 4,497.25, which on 23 March at 04:00 closes at 4,209.86 (−287.69). The next short closes the same day at 16:00 at 4,401.50 (−191.94). In two days the two losses (−479.63) exceed the gain of the four days before.

Figure 2. One large gain and two large losses: the short of 18 March earns 435.77 dollars per ounce, but the crossover that closes it opens a long that loses 287.69 and a short that loses 191.94.Data: gold, XAUUSDT perpetual future (real candles) · 4 hours (H4) · from 16 Mar 2026 00:00 UTC to 26 Mar 2026 00:00 UTC.
Read the chart in words

H4 gold chart from 16 to 26 March 2026 and, below, the MACD (12, 26, 9) with a black line, a dashed pink signal and a grey histogram. Labels mark the crossovers and the result of each trade.

WhenWhatPrice
18 Mar 2026 08:00 UTCdown: trade −76 $4,928.84
22 Mar 2026 00:00 UTCup: trade +436 $4,498.80
23 Mar 2026 04:00 UTCdown: trade −288 $4,124.10
23 Mar 2026 16:00 UTCup: trade −192 $4,470.75

Times in UTC.

What the data says

The benchmark with any candle gives: up carries on 36%, down carries on 40%. Crossovers with the signal, for four parameter sets:

MACDCrossovers with the signalUpward: carries on, mean moveDownward: carries on, mean move
(12, 26, 9)12338% ±12, +0.13 ± 0.42 ATR52% ±13, +0.03 ± 0.55
(8, 17, 9)15838% ±11, +0.30 ± 0.3644% ±11, −0.04 ± 0.52
(5, 35, 5)19844% ±10, +0.13 ± 0.3643% ±10, +0.02 ± 0.44
(24, 52, 18)7732% ±15, −1.05 ± 0.8546% ±16, +0.47 ± 0.77

With 37-94 signals per side, no crossover can be told from the benchmark: the percentages sit between 32% and 52%, with errors of 10-16 points. The zero-line crosses are 50, 76, 68 and 32: with 13-37 signals per side they give percentages between 42% and 54% and errors from 16 to 27 points.

The state (every candle counts as a signal), with the MACD (12, 26, 9):

ConditionSignalsCarries onMean move (ATR)
Line above zero (up)83339%+0.25 ± 0.11
Line below zero (down)88842%+0.42 ± 0.11
Histogram positive (up)85336%−0.31 ± 0.12
Histogram negative (down)86843%−0.12 ± 0.10
Line above zero and above the signal (up)45142%+0.54 ± 0.14
Line below zero and below the signal (down)48641%−0.29 ± 0.13

The line above or below zero gives a weak tendency in the direction of the indicator (like the averages of chapter 2: the line is a difference of averages), while the positive histogram was followed by an average fall (−0.31 ATR): the histogram's change of sign did not flag continuation. Signals of neighboring candles overlap and the real error is about three times larger.

An always-in system

The system buys at the upward crossover and sells (short) at the downward one, cost of 0.30 dollars per ounce:

MACDTradesWinningMean per tradeTotalRandom flips with total at least equal
(12, 26, 9)11947 (39%)−0.32 ± 9.62 dollars−3850%
(8, 17, 9)15158 (38%)+0.48 ± 7.11 dollars+7247%
(5, 35, 5)18875 (40%)+4.59 ± 5.50 dollars+86222%
(24, 52, 18)7325 (34%)−2.96 ± 16.18 dollars−21659%

By changing only the parameters the total goes from −216 to +862 dollars per ounce, and the mean per trade always sits inside its error (from 5.5 to 16.2 dollars). The (5, 35, 5) set is the best: chance equals it in 22% of trials, but it is the best of four tried. If you try more, the best will always be positive even without an edge (chapter 11).

A four-step routine

  1. Write the three parameters and what counts as a signal (crossover, zero line or state).
  2. Count all the signals, including the strings of crossovers in a sideways period.
  3. Try several parameter sets and write them all down: you need them to read the best one.
  4. Compare each system with random flips of the same number.

Exercises

Chapter exercises

1. On the chart the letters sit on the first four crossovers between the MACD line and the signal. Which letter is the first upward crossover?

Chart exercise. Data: gold, XAUUSDT perpetual future (real candles) · 4 hours (H4) · from 4 Sept 2026 00:00 UTC to 14 Sept 2026 00:00 UTC.
Read the chart in words
WhenWhatPrice
5 Sept 2026 16:00 UTCPoint A4,435.64
8 Sept 2026 00:00 UTCPoint B4,444.09
8 Sept 2026 04:00 UTCPoint C4,394.51
9 Sept 2026 12:00 UTCPoint D4,437.54

Times in UTC.

2. What is the MACD histogram?

3. The MACD (5, 35, 5) system gave +862 dollars per ounce and the (24, 52, 18) −216. What do you conclude?

4. The March short earned 435.77 dollars per ounce, but the next two trades lost 479.63. What does it teach?

Have a question or want to share your exercise?

Post in the community, or join the free signals room on Telegram.

Educational content, not financial advice. Trading involves risk.