Skip to main content

Exponential Moving Average Crossover

IntermediateEquity MarketsAlso known as: EMA, MACD idea, golden cross, death cross, trend following

Finds: A trend signal from two moving averages.

When to use it: Use it to follow a trend. A short average crossing above a long one is read as an upward trend (a "golden cross"), and crossing below as a downward trend. The EMA reacts faster than the simple average, but it also gives more false signals.

The formula

EMAt\displaystyle EMA_{t}=αPt+(1−α)EMAt−1\displaystyle =\alpha P_{t}+(1-\alpha)EMA_{t-1}α\displaystyle \alpha=2n+1\displaystyle =\frac{2}{n+1}

In words: EMA today = alpha x Price today + (1 − alpha) x EMA yesterday, with alpha = 2 / (n + 1)

What each symbol means

alphaSmoothing weight on the latest pricedecimal
nNumber of days that sets how quickly the average reactsdays
EMAExponential moving average, which gives more weight to recent prices than a simple averagemoney

Worked example

A stock closed at 10, 10.4, 10.2, 10.8, 11.1, 10.9, 11.5, 11.8, 11.6 and 12.2. Using a 3-day and a 7-day EMA, started from the first price, what is the signal?

Short EMA11.872
Long EMA11.450
Gap11.8719 − 11.45010.422
The answer

The short EMA is 11.872 and the long EMA is 11.450. The short one is above the long one, a gap of 0.422, so the trend signal is upward.

Want every formula on a few pages?Get the free Cheat Sheet (PDF) →

Calculator

Short EMA11.872
Long EMA11.450
Gap0.422

Keep going