MACD line
The gap between a fast and a slow average of the close, in dollars: above zero means the short-term trend is up.
This is the MACD line: a fast exponential average of the close (12 bars by default) minus a slow one (26 bars). Both averages follow price, so the line is a dollar gap per share that widens when price trends away from its recent average and narrows as the two converge. It draws only this line; the signal line and histogram are separate indicators, and signal_period does not change it.
How to read it
- The line sits in its own pane below the price, centred on zero.
- Above zero: the fast average is above the slow one, a short-term up-trend. Below zero: a short-term down-trend.
- Zero crossings mark the moment the two averages cross. Both lag price, so a crossing confirms a move that is already under way.
- The scale is dollars per share. Judge swings against the line's own recent range, not against the same number at a different price level.
What it outputs
- MACD line
- Fast EMA minus slow EMA of the close, in dollars per share. On SPY one-minute bars in September 2026 the middle 90% fell between -0.26 and +0.25; the extremes were -1.39 and +0.97.
Settings
- fast_period
- Length of the fast average, default 12 bars. Lower reacts within minutes and crosses zero more often; higher smooths the line, so it turns later and crosses zero less often.
- slow_period
- Length of the slow average, default 26 bars. Higher lags more, so a sustained trend builds a wider gap and the line turns later. Lower pulls the slow average toward the fast one and shrinks the line toward zero.
- signal_period
- No effect on this line. It sets the smoothing of a signal line inside the indicator that this output does not draw, so changing it leaves every value on the chart unchanged.
Pitfalls
- This entry draws only the MACD line. The signal line and histogram are separate indicators, so the usual signal-line crossover is not shown here.
- Both averages start from the first close, so the first bars sit near zero and drift as the warm-up runs. Read the line only after several slow_period bars.
- Both averages lag price, so the line turns after a move has started. Its correlation with the close is about 0.10: it tracks change in trend, not the price level.