Moving Average Convergence Divergence (MACD)


Identifies trend strength and reversals using short and long EMAs, a signal line, and a histogram.\

Function Syntax

=MACD(data,shortPeriod, longPeriod,signalPeriod  )  
  • data (array) :
    Range of columns containing the date, Open, high, Low, close, volume data.

  • shortPeriod (number):
    Number of periods (days) used for calculating the short-term Exponential Moving Average (EMA). Typically 12 periods.

  • longPeriod (number):
    Number of periods (days) used for calculating the long-term EMA. Typically 26 periods.

  • signalPeriod (number):
    Number of periods (days) used for calculating the EMA of the MACD line itself, known as the signal line. Typically 9 periods.

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

Output Example

Below is an example of the resulting array when applying the custom =MACD() function.

macd return array