A moving average (MA) is a trend-following or lagging indicator because it is based on past prices.

The two basic and commonly used MAs are the simple moving average (SMA), which is the simple average of a security over a defined number of time periods, and the exponential moving average (EMA), which gives the bigger weight to more recent prices.

While DEMA (Double Exponential Moving Average) is a technical indicator based on both a single exponential moving average (EMA) and a double EMA. It’s more volatile. This indicator is hence used with low beta stocks like Coal India which moves very slow.

But we use EMA as it lies in between SMA and DEMA in terms of volatility.

Moving Averages also form the basis for other indicators such as the Moving Average Convergence Divergence (MACD) or Bollinger Bands.

Here go the settings of Moving Average. This is a representation of SMA (10) which means –

We’re taking an average of closing price (Period = Close) of last 10 candlesticks (If the timeframe is daily, then last 10 trading days) and calling it Moving Average.

Type = Simple means it’s Simple Moving Average.

Let’s calculate the moving average of Bank of India. Calculate me SMA(10) on 24/04/2017 –

When we mention SMA (10) it is generally assumed to be in daily timeframe over a close field (We take close prices here). So last 10 prices from 24/04/2017 are

So the average of the dataset (146, 149.15, 147.6, 149.3, 147, 152.6, 149.3, 152.2, 150.45, 153.15 ) is 149.675