Moving averages are one of the most heavily used technical analysis tools.Â Moving averages smooth a series of data points.

Moving averages smooth the randomness of a securityâ€™s daily price fluctuations to reveal underlying trends.Â

Moving averages are most commonly calculated using closing prices for a specific timeframe. For example, an hourly chart would use each hourâ€™s closing price and a daily chart would use each dayâ€™s closing price.

## What is an exponential moving average?Â

An exponential moving average is the weighted average of a set of data points where new data points receive greater weight in the calculation.

An exponential moving average is a technical indicator that uses a multiplier to give preference to newer data points and reduce lag in responsiveness to price movements. Exponential moving averages (EMAs) and simple moving averages (SMAs) are the two most popular moving averages to help traders identify trends.

A number of technical indicators, such as the MACD, use exponential moving averages as a smoothing factor or signal line.Â

Traders also use multiple EMAs to determine levels of support and resistance, generate buy or sell signals, confirm trading signals, and more.

## How to calculate an exponential moving average

To calculate an exponential moving average, first determine the weight of todayâ€™s data point in the EMA calculation.Â

Shorter moving averages have heavier weights for todayâ€™s data point.Â

Second, determine the weight of yesterdayâ€™s EMA in the calculation.

Finally, once youâ€™ve calculated the weights, incorporate todayâ€™s closing price into the full EMA calculation.

EMAs address the â€śdrop-off effectâ€ť caused when the earliest data point rolls off of an SMA calculation.

## What is the best exponential moving average length?

50 and 200-day simple moving averages receive the most attention. 12-day and 26-day EMAs are the most popular for short-term traders, and 50-day and 200-day EMAs for longer-term traders.

The periods are somewhat arbitrary and there is little difference between a 25-day EMA and a 26-day EMA. However, the â€śpower of the crowdâ€ť is evident when a large number of traders are watching the same timeframe indicators.Â

Which length is best?Â

The longer the timeframe, the more data points, the less the reaction to new data points, and the smoother the series. One-day changes in a securityâ€™s price do not have a significant effect on longer-length moving averages. That can be good. However, if a stockâ€™s trend changes abruptly, longer exponential moving averages take longer to adapt.Â

Thereâ€™s a balance between responsiveness to trend changes and false signals from price outliers.Â

Moving averages react to data points and are not intended to be predictive like other technical indicators. Moving averages simply follow price action and exponential moving averages react more quickly to new data points than simple moving averages.Â

The moral of the story: align the moving average length with your trading timeframe. For example, if you are a long-term buy-and-hold investor, the 5-day EMA shouldnâ€™t affect your decisions.Â

However, short-term traders may still use a long-term EMA, such as the 50-day or 200-day, to identify an overall trend and establish bias. For example, a day trader may only take long trades if the underlying security is above the 200-day EMA.

## Using exponential moving averages in stock trading

Traders use EMAs in a number of ways as entry and exit signals.Â

Support and resistance often rest where two moving averages crossover. So, traders use crossovers for systematic entries and exits. Crossovers are where two moving averages or a moving average and a securityâ€™s price cross on a price chart.

For example, a short-term EMA crossing over a longer-term EMA is a mechanical buy signal for many traders. Similarly, a short-term EMA crossing below a longer-term EMA is a sell signal.Â Â

One caveat for EMA entry and exit signals is that neutral or sideways price action can generate many low-quality signals leading to whipsaws. EMAs are more useful for entry and exit signals in trending markets. So, EMAs are often used with other momentum signals.Â

Traders also use EMA as an exit trigger. Long-term EMAs can be used for entry signals and shorter-term EMAs for more responsive exit signals.Â

For example, trend following traders could enter a position when price crosses above the 26-day EMA and exit the position when price crosses below the 12-day EMA.

EMAs are a tool in many traderâ€™s technical analysis toolbox. Remember to align the moving average length with your trading timeframe.