Moving Average Convergence Divergence (MACD)


The Moving Average Convergence Divergence (MACD), developed by Gerald Appel, is a widely used trend-following momentum indicator that shows the relationship between two Exponential Moving Averages (EMAs) of a security’s price. The MACD is composed of three main elements: the MACD line itself (the difference between two EMAs), a ‘signal line’ (an EMA of the MACD line), and a histogram (the difference between the MACD and signal lines). Traders use the MACD to identify changes in the direction, strength, and momentum of a price trend, often looking for crossovers between the MACD line and the signal line as potential buy or sell signals.

MACD

=MACD(data, shortPeriod, longPeriod, signalPeriod)

Example Usage

=MACD(A2:F500, 12, 26, 9)

Parameters

Parameter Type Description Status
data
Range
The input range of columns containing the Date, Open, High, Low, Close, and Volume data.
Required
shortPeriod
Number
Number of periods (days) used for calculating the short-term Exponential Moving Average (EMA). Typically 12 periods.
Required
longPeriod
Number
Number of periods (days) used for calculating the long-term EMA. Typically 26 periods.
Required
signalPeriod
Number
Number of periods (days) used for calculating the EMA of the MACD line itself, known as the signal line. Typically 9 periods.
Required

Returns

A four-column array of dates with corresponding MACD line, signal line, and histogram values.

MACD Formula Result in Google Sheets