MACD is a compact view of the gap between a faster and a slower moving average. It can describe whether that gap is widening, narrowing or changing sign; it cannot decide what the next price bar will do. A crossover or divergence becomes a trading methodology only after its timing, exit, costs and failure condition are written down. Fidelity's MACD guide and cTrader's MACD reference document the calculation components. Neither turns them into an edge.
What MACD actually measures
MACD, short for Moving Average Convergence/Divergence, is an oscillator built from two exponential moving averages (EMAs). In its familiar form, the MACD line is the shorter EMA minus the longer EMA; a further EMA of that line is the signal line. Fidelity documents the conventional 12, 26 and 9 periods, while cTrader's MACD CrossOver documentation exposes the corresponding long cycle, short cycle and signal-period inputs.
MACD line = EMA(close, 12) - EMA(close, 26)
signal line = EMA(MACD line, 9)
histogram = MACD line - signal line
The 12, 26 and 9 settings are a convention, not a market constant. Fidelity calls them its default calculation, and cTrader presents the cycles and period as inputs rather than fixed truths. Change the inputs and you change what counts as a crossover, a peak and a divergence.
The histogram is not a second opinion. It is another representation of the distance between the MACD line and its signal line. cTrader defines its histogram as the difference between the short and long cycles, while the same documentation defines the signal as an EMA of the displayed MACD series. The three lines are related calculations of the same underlying price history.
The readings traders tend to mix together
MACD is commonly read through the line-versus-signal relationship, its position around zero, and divergence from price. Those are separate hypotheses. Treating them as one label makes a chart look persuasive and a test impossible to interpret.
| Observation | What it describes | What it does not establish |
|---|---|---|
| MACD crosses its signal line | The EMA gap has changed relative to its recent smoothing | That the next move will continue |
| MACD is above or below zero | The faster EMA is above or below the slower EMA | That the prevailing move is durable |
| Histogram expands or contracts | The line-to-signal gap is widening or narrowing | A target, stop or direction |
| Price and MACD form different swing shapes | A chosen price swing differs from a chosen oscillator swing | A reversal without a fixed definition |
Fidelity describes the conventional bullish and bearish interpretation of signal-line crossings and also warns that MACD can whipsaw in trading ranges. cTrader's reference shows that the same line and signal series can be accessed in code. That is useful because a programmer can say which closed bar generated a crossover. It is not proof that every crossover is worth acting on.
Why divergence is the softest part of the method
MACD divergence is a comparison between a price swing and an oscillator swing. The appealing version is simple: price makes a new extreme while MACD does not. The missing detail is what qualifies as a swing, how much separation matters, how long the comparison remains valid, and what cancels it.
Those choices are not cosmetic. A different MACD period moves the oscillator peaks; a different rule for price pivots changes which peaks qualify. Fidelity explicitly permits parameter adjustment, while cTrader exposes the cycles as user-supplied inputs. A divergence rule is therefore not reproducible until those choices are fixed before seeing its outcome.
The same problem applies to a crossover. A historical chart can show an elegant crossing at the exact turn because the reader already knows which ones mattered. A test must decide whether it acts at the close of the crossing bar or at the next available price, and whether it accepts repeated crosses in a range. Leaving either decision to visual judgement is hindsight disguised as discretion.
What the evidence can and cannot say
Published evidence on technical rules is not a universal verdict on MACD. Brock, Lakonishok and LeBaron tested moving-average and trading-range-break rules on the Dow Jones Index over their stated sample; Park and Irwin's review surveyed the broader profitability literature and highlighted data snooping, ex-post rule selection, risk estimation and transaction costs as recurring problems. These are serious sources for how technical-rule claims should be judged, but neither paper licenses an untested MACD rule on another market.
That distinction is the useful criticism. MACD can be made objective as a calculation. A trading method still contains discretionary choices: market, timeframe, input periods, crossover definition, divergence definition, order timing, exit, sizing and costs. A positive chart example is not evidence that the complete package survives those choices.
How you'd actually test it
The question is not whether MACD "works." It is whether one pre-specified MACD rule survives costs and data it did not influence. A useful research protocol is deliberately boring:
- Choose one hypothesis. Test a signal-line crossover, a zero-line filter, or a divergence rule separately. Combining them first prevents you from learning which part carried the result.
- Freeze the definition. Name the instrument universe, timeframe, price field,
12,26and9baseline, entry bar, exit rule and invalidation rule before examining the final sample. If alternatives are tried, list the candidate set in advance and report every result. - Use closed-bar information. Record whether the signal exists only after the close and fill at the next available price. The cTrader MACD reference is useful here because it makes the line, signal and histogram series explicit rather than leaving the chart to decide.
- Cost the path. Include spread, slippage, commission and swap where they apply. The real-cost backtesting explainer explains why a zero-cost curve cannot fairly judge a fast or frequently trading rule.
- Keep a period untouched. Use data that did not participate in choosing the definition, then compare the result with the in-sample version. The out-of-sample testing guide explains why that separation matters.
- Report the whole result. Record trade count, expectancy, drawdown, turnover, exposure and cost contribution—not only the total return. Then check nearby parameter choices and other market conditions without quietly choosing the most flattering slice. Parameter sensitivity in prop backtesting is the relevant companion.
That is the test-it-don't-trust-it standard. realbacktesting is a trading-software studio for cTrader built around results a trader can reproduce; its proof standard is more useful than a polished indicator screenshot.
Frequently asked
Is MACD a leading or lagging indicator?
MACD is derived from moving averages of past prices, so its calculation is lagging. Its histogram may change before a line crossover is visible, but it is still calculated from the same past prices. Fidelity and cTrader both document those moving-average-based components.
Are 12, 26 and 9 the correct MACD settings?
They are conventional default settings, not an optimum established for every instrument or timeframe. Fidelity presents them as the default calculation, and cTrader exposes the long cycle, short cycle and period as adjustable inputs in its MACD CrossOver reference.
Does MACD divergence predict a reversal?
No automatic conclusion follows. Divergence depends on how price and oscillator swings are defined, and the method still needs a pre-specified entry, exit and invalidation rule. Fidelity permits parameter changes, while cTrader exposes those parameters directly; that is why a backtest must freeze them before the unseen data is checked.
Takeaway
MACD is an honest calculation, not an honest trade by itself. The useful work starts when its story is reduced to a rule that can fail in a costed, unseen test.