Moving Average is a technical indicator to calculate the moving average of a stock. You can read more about moving averages below.

**Know What is a Moving Average (MA)**

Moving average in finance is a stock indicator that is generally used in technical analysis. The reason for calculating the moving average of a stock is to help streamline price data by establishing an average price that will be updated continuously.

By performing a moving average calculation, the impact of short or short term random fluctuations on the cost of the stock over a given period of time is mitigated.

Moving average is a simple technical analysis tool to refine a cost data by creating an average price that is always updated. Average is taken over a certain period of time, such as: 10 days, 20 minutes or 30 weeks, and also the time period chosen by the trader. There are advantages to using moving averages in your trades, and there are options about the type of moving average you will use.

The moving average strategy is popular and can be adapted to any time-frame, to suit both short-term and long-term traders.

**Different Types of Moving Averages**

There are different types of moving averages, you can see the differences between each type below:

**Simple Moving Average**

The simple moving average (SMA) is a calculated average of the selected price estimates, generally closing prices, with the amount of time in the estimate.

The SMA is a moving average of arithmetic that can be calculated by adding the most recent cost and then dividing that number by the number of time periods in the calculated average. For example, one person can season the closing costs of the security over several periods of time and then give this total for the same total number of terms. Averages on short time frames respond quickly to a modification in the price of the underlying security, while averages on longer time frames respond more slowly.

Where :

An = Price of an asset in period n

n = Number of total periods n

For example, this is how you calculate the simple moving average of a security with the following closing prices over a 15-day period.

First Week (5 days): 20, 22, 24, 25, 23

Second Week (5 days): 26, 28, 26, 29, 27

Third Week (5 days): 28, 30, 27, 29, 28

The 10-day moving average will issue the average closing price within the initial 10 days as the initial or first data point. The next data point will drop the earliest price and add the price sum on the 11th day. Then take the average, and so on. Likewise, a 50-day moving average will collect enough data to average data from 50 consecutive days on a rolling basis.

Simple moving averages can be aligned because they can be calculated for amounts over various time periods. This is done by continuing a security's closing cost for some period of time and then dividing the total by the number of time periods, which gives the average cost of the security over that time period.

SME smoothes out volatility and also makes it easier to track a security's cost trend. If the SME is pointing up, it means the cost of securities is growing. If it is pointing downwards, it means that the cost of the security is decreasing. So the longer the moving average, the smoother the simple moving average will be. Moving averages with shorter timeframes are more volatile, but reading them will be closer to the data source.

Exponential Moving Average (EMA)

Exponential moving averages put more weight on the latest costs in the process of making them more responsive to new information. In calculating the EMA, the simple moving average (SMA) over a given period is calculated first.

Then calculate the multiplication for the EMA load, known as the “smoothing factor”, which generally follows the formula: [2/(selected time period + 1)].

On the 20-day moving average, the multiplier is [2/(20+1)]= 0.0952. The smoothing factor is combined with the previous EMA to arrive at the current value. The EMA thus assigns a more expensive weight to recent prices, while the SMA gives the same weight to all sum values.

The formula for EMA is:

Where :

EMAt = EMA of today

Vt = Value from today

EMAy = yesterday's EMA

s = Smoothing

d = Number of days

Simple Moving Average (SMA) vs. Exponential Moving Average (EMA)

Calculations for the EMA will place more emphasis on the most recent data points. Therefore, the EMA will be considered a weighted average calculation.

In the figure below, the number of periods used in each average is 15, but the EMA responds more quickly to price changes than the SMA. The EMA has a higher value when the price is rising than the SMA and falls faster than the SMA when the price is falling. This responsiveness to price changes is the main reason why some traders prefer to use EMA over SMA.