MACD - Moving Average Convergence / Divergence

The MACD indicator was developed by Gerald Appel in the late 70s and is used to indicate both trends and momentum.

It is based on a MACD line calculated by subtracting the difference between a short term EMA of the Close Price and a longer term EMA of the Close Price. A signal line is then generated by applying an EMA to the MACD line. And finally a histogram shows the difference between the MACD Line and the Signal line.

The MACD line will be above 0 when the short term average is higher than the long term average and below 0 when it is lower. So the further away from 0 the more divergent the EMAs. An increasing MACD line indicates upward momentum and a decreasing line indicates downward momentum.

The most common use of MACD is to track crossovers between the Signal line and the MACD line in order to spot turns. Crossovers of the MACD line and the 0 line are also useful.

Calculation

MACD Line: 12 day EMA - 26 day EMA (Blue)

Signal Line: 9 day EMA of MACD Line (Red)

MACD Histogram: MACD Line - Signal Line (Orchid)

Sufficient Data for Accuracy

The MACD is based on EMAs which are one of several indicators that include an element of prior data. As such a 26 day EMA based on 50 days of underlying data will be significantly different to a 26 day EMA based on 500 days of data. This site will always include enough data to ensure 'accuracy'. 

Exponential Moving Average

is a variation on Simple Moving Average. Instead of giving equal weight to all days in the period, the EMA gives more weight to recent days in the period.

Calculation

First determine the weighting multiplier or percentage as 2 / (Period + 1).

So for a 10 day period the multiplier is .1818 or 18.18%. This is the weighting to be applied to the most recent bar. (As opposed to a 10 day SMA which will use 10% for all bars.) 

To  provide a base for the EMA, next calculate a 10 day SMA for the immediately preceeding bars.

The first EMA is then calculated as SMA + ((Close - SMA)  * Weighting).

And subsequent bars as Previous EMA + ((Close - Previous EMA) * Weighting), and so on.

Average Other Values

Although the default input is Close Price, you can vary this to any other item. For example, you could specify Volume as the Custom Input to create Exponential Moving Average Volume.

Sufficient Data for Accuracy

EMA is one of several indicators that include an element of prior data. As such a 50 day EMA based on 50 days of underlying data will be significantly different to a 50 day EMA based on 500 days of data. This site will always include enough data to ensure 'accuracy'.
Custom Dates

C
h
a
r
t

P
a
g
e
r

Symbol Id Name Exchange Close Price Trade Date
Charts per page:
Page 1 of 1. Rows 1 to 1 of 1.0.188s
AAPLAPPLE INC.10/17/2017Nasdaq GS160.470010/17/2017NGSM
Append Replace