A moving average is a technical indicator that statistically calculates a mean of past stock prices for a given period of time. It is heavily used by traders to obtain a valuable information about trend, as most of technical indicators, it is based on historical data. Moving averages are components of every successful investor’s chart, it is provided by every trading engine or software and an individual can launch them into use without any further calculation. Despite that we are going to take it from the basics, because it is always good to understand the principles behind. There are several moving averages, while all of them are important and handy on a chart.

 

Simple Moving Average

Simple Moving Average is the simplest and gives the best picture for understanding. Let’s say we want to use a 10 days moving average and do the math:

SMA (10) = sum (prices of past ten days) / number of days
SMA (10) = (4+5+6+5+6+9+12+10+12+13) / 10
SMA (10) = 82 / 10
SMA (10) = 8.2

The left side of the equation is our moving average, the right side is a summed data set of past prices divided by number of days. The moving average of past ten days is eight twenty.
Now, let’s imagine today is over and we are in tomorrow, while the stock price moved higher to $15.

SMA (10) = (5+6+5+6+9+12+10+12+13+15) / 10
SMA (10) = 93 / 10
SMA (10) = 9.3

As you can see above, the oldest day’s price of $4 was thrown away and the most recent price of $15 was included. This is why it’s called moving average, the mean of the values keeps moving as time goes by.
Exponential Moving Average is slightly upgraded version of simple moving average, where EMA pays more attention to the most recent prices. In other words, the new data play more important role in the entire data set – the importance decreases exponentially as the days go back. Thus, the result is emphasised by traders’ recent activity.

 

Exponential Moving Average

Calculation of EMA involves rather more than less complicated linear regression equation, which you better look up from a text book if interested. For understanding purpose see below simplified version:

EMA = multiplier * price + 1 – α * EMA from yesterday
multiplier = 2 / (number of periods + 1)

 

Moving Averages on Chart

Google Moving Average

A red line is the simple moving average and a blue line is the exponential moving average. How to use the moving averages will be explained in next article.

 

Another moving average is Weighted Moving Average, which also puts higher importance on more recent data although not exponentially. The indicator puts weight on the individual prices based on the ratios of period to the price.

WMA = price * (period / number of periods) + next day price * next day (period / number of periods) + …
When it comes to deciding which moving average to use when analyzing the trend and trading share, it depends on the strategy of individual trader. From a long term it is maybe better to use simple, in short term it better to use exponential. Then it also depends on the market situation and what level is the market in. If it’s in basing level one, the simple might make more sense. For level two would be better to use exponential, because the price is going up driving the bull market.
The best is to use both simple and exponential moving averages and see how they work with your particular trading strategy.

Moving Average Convergence / Divergence also known as MACD is a technical analysis indicator developed by Gerald Appel in 70s. Based on historical time series it uses EMAs of various lengths to show relation between the averages – usually it computes 12 days short period, 26 days long period and 9 EMA period. Putting this on a chart gives traders valuable information about the changes in price, its strength and future direction in trend analyses.