A moving average is a technical indicator that market analysts and investors may use to determine the direction of a trend. It sums up the data points of a financial security over a specific time period and divides the total by the number of data points to arrive at an average. It is called a “moving” average because it is continually recalculated based on the latest price data.

A simple moving average (SMA), is calculated by taking the arithmetic mean of a given set of values over a specified period. A set of numbers, or prices of stocks, are added together and then divided by the number of prices in the set. The formula for calculating the simple moving average of a security is as follows:

SMA = [A1 + A2 + …+An] / n

where:

A = Average in period n

n = Number of time periods

**Exponential Moving Average (EMA):**

EMA is the other type of moving average that gives more weight to the most recent price points and makes it more responsive to recent data points.

EMA is more responsive to recent price change when compared to the SMA as it applies the same weight to all price changes in the given specific period.

There are three steps involved when calculating EMA:

- First, we need to calculate the simple moving average for the specific period.
- Then we need to calculate the multiplier for weighing the exponential moving average.
- The last step involves the calculation of the current EMA by taking the period from the initial EMA until the most recent time period, using the price, multiplier, and the previous period’s EMA value. The formula is:

Current EMA = [Closing Price – EMA (Previous Time Period)] x Multiplier + EMA (Previous Time Period)

**Weighted Moving Average (WMA):**

WMA is another type of moving average which traders use for generating trade direction and making a buy or sell decision.

It gives greater weightage to the recent data points and less weightage on past data points.

It is calculated by multiplying each point in the data set by a weighting factor.

Traders use the weighted average for generating trade signals. For example, when the prices are above the weighted moving average, then it signals that the trend is an uptrend.

But if the prices are below the weighted moving, then it indicates the trend is down.

**Double Exponential Moving Average (DEMA):**

DEMA is an improved version of EMA as it allocates more weight to the most recent data points.

It reduces lag results and is more responsive that helps short-term traders in spotting trend reversals quickly.

**The Triple Exponential Moving Average (TEMA):**

TEMA reduces the lag of EMAs and makes them more responsive to the prices.

After the Double Exponential Moving Average (DEMA) was developed in 1994, Patrick Mulloy created the Triple Exponential Moving Average (TEMA).

Just like DEMA, the TEMA reduces the lag difference between different EMA.

The difference between DEMA and TEMA is that TEMA’s formula uses a triple-smoothed EMA in addition to the single and double-smoothed EMAs employed in the formula for DEMA.

**Linear Regression (or) Least square Moving Averages:**

The least-square moving average (LSMA) calculates the least-squares regression line for the preceding time periods; thus, it leads to forward projections from the current period.

The indicator helps in identifying what could happen if the regression line is continued.

The indicator is based on the sum of least squares method for finding a straight line that best fits data for the particular period.