Skip to main content
Moving Averages

While some technical indicators are more popular than others, few have proven to be as objective, reliable and useful as the moving average. They may have various forms, but the underlying principle remains the same; to keep track of the current trend direction by smoothing out price fluctuations. A moving average is calculated from the average of a fixed set of historical prices. This calculation is dynamic in that the newest price information is included in the calculation and dependent on the type of moving average, the oldest prices are dropped from the calculation. If prices are moving higher, the moving average will progress higher; conversely if prices are moving lower, the moving average will progress lower. Moving averages therefore give a trader insight into the direction in which a trend is progressing on a lagged basis. Moving averages also provide the basic building block for many other technical indicators and overlays, such as Bollinger Bands, MACD and in Stochastics.

Different moving averages have been developed for use in trading and the most commonly used are the simple, weighted and exponential moving averages. A simple moving average (SMA) is the simple arithmetic average of prices over a set period. A weighted moving average (WMA) gives an increasing weight to price as the current price is approached. An exponential moving average (EMA) retains each point of the moving average since inception but adds the newest price based on a multiplier which in turn is based on the period defined for the moving average. As it stands the simple moving average will lag the exponential moving average which lags the weighed moving average. Seen in another perspective, the weighed moving average will be choppier than the exponential moving average which will be choppier than the simple moving average.

Each type of moving average differs in how it is calculated and the calculation of each will be illustrated from the following data set. In each case the 5-period moving average will be calculated and as such the calculation only starts after the 5th data point.


Simple Moving Averagen = (Sum of n Days)/n
SMAday5          = (Day1 + Day2 + Day3 + Day4 + Day5)/5
                        = ($10.22 + $11.20 + $11.65 + $11.93 + $12.65)/5
                        = ($57.65)/5
                        = $11.53
SMAday6          = (Day2 + Day3 + Day4 + Day5 + Day6)/5
                        = ($11.20 + $11.65 + $11.93 + $12.65 + $12.34)/5
                        = ($59.77)/5
                        = $11.95
…
SMAday10        = (Day6 + Day7 + Day8 + Day9 + Day10)/5
                        = ($12.34 + $12.45 + $13.58 + $14.50 + $14.30)/5
                        = ($67.16)/5
                        = $13.43

Weighted Moving Averagen = sum of ((n/d) x Dayn)
Where;             n = the day number
And                 d = the sum of the days (for 5 this is 5 + 4 + 3 + 2 + 1 = 15)
                        Sum of (n/d) = 1        
WMAday5        = ((1/15)*Day1 + (2/15)*Day2 + (3/15)*Day3 + (4/15)*Day4 + (5/15)*Day5)
                        = ((1/15)*$10.22 + (2/15)*$11.20 + (3/15)*$11.65 + (4/15)*$11.93 + (5/15)*$12.65)
                        = $11.90
WMAday6        = ((1/15)*Day2 + (2/15)*Day3 + (3/15)*Day4 + (4/15)*Day5 + (5/15)*Day6)
                        = ((1/15)*$11.20 + (2/15)*$11.65 + (3/15)*$11.93 + (4/15)*$12.65 + (5/15)*$12.34)
                        = $12.17
…
WMAday10       = ((1/15)*Day6 + (2/15)*Day7 + (3/15)*Day8 + (4/15)*Day9 + (5/15)*Day10)
                        = ((1/15)*$12.34 + (2/15)*$12.45 + (3/15)*$13.58 + (4/15)*$14.50 + (5/15)*$14.30)
                        = $13.83

Exponential Moving Averagen = (2/(n+1)) x (Closing Price – EMAPrevious day) + EMAPrevious day
Where;             n = the number of days
And                 the first EMA point is the SMA
SMAday5          = (Day1 + Day2 + Day3 + Day4 + Day5)/5
                        = ($10.22 + $11.20 + $11.65 + $11.93 + $12.65)/5
                        = ($57.65)/5
                        = $11.53
(2/(n+1))         = 0.3333
EMAday6          = (0.3333 x ($12.34 - $11.53)) + $11.53
                        = $11.80
EMAday7          = (0.3333 x ($12.45 - $11.80)) + $11.80
                        = $12.02
…
EMAday10        = (0.3333 x ($14.30 - $13.19)) + $13.19
                        = $13.56

Below is a summary table illustrating the differences between the different Moving Averages

The WMA follows the most recent price the closest, followed by the EMA and then the SMA. This fact stems from the fact that the WMA ascribes the most weight to the current price, and that the EMA maintains the old EMA values as the moving average progresses. Apart from being dependent on how the moving average is calculated, the lagging factor of the moving average is also dependent on how many data points is used in the calculation. A short term moving average will closely follow price action, whereas a long term moving average will require a significant reversal before changing direction.

EUR/USD Daily Heiken Ashi chart with 100-day SMA, WMA and EMA loaded

The length of the moving average depends on the objectives and the style of trading of the trader. A short term moving average is suited for use in short term trades such as scalping to intraday trading, whilst a medium term moving average is suited for medium term trades such as intraday to swing trading techniques and long term moving averages for long term trades such as position trading.
When one moving average is used, signals for trading are generated based on the relation of price to the moving average. Bullish signals are generated when price crosses and moves above the moving average, and conversely, bearish signals when price crosses and moves below it. Alternatively, two or three moving averages may be employed to generate signals. When short term moving average cross and move above longer term ones it is called a golden cross and is considered a bullish signal. Conversely, when shorter term moving averages cross and move below longer term ones called a dead cross, a bearish signal is generated. The drawback to relying on moving average crossovers are the fact that both indicators are lagging indicators that produce a multiplied lagging effect on the signal. This lagging aspect is reduced when price crossovers are considered.

EUR/USD Daily Heiken Ashi chart with Short term MA price cross-overs within a longer trend


Moving averages may also act as dynamic zones of support in uptrends, and resistance in downtrends. Pending on the length of moving average that is used, support and resistance often occur when price reaches the 20, 50, 100 and 200 period moving averages as these are the most popular settings that are used, and market participants become significantly involved around these areas. However, it should not be expected that price would bounce perfectly off from these MA’s as markets are primarily driven by emotions.


Next Indicator - Stochastic Oscillator

Back to technical analysis central

Comments

Popular posts from this blog

USDOLLAR

Fundamentally the Dollar is set to rally to 12,240 - 12,250 following an upward revision in 1st quarter GDP data and the build-up to the June FOMC meeting in which the Fed is expected to raise rates by 25bp in line with the three rate hike forecast since December. The final hurdle to cross is the June NFP due this coming Friday - in which only a strongly disappointing report can derail this plan. Strongly disappointing in this context would have to show less than March job growth, with its low number of 98k. Inflation remains on course according to the Fed, and fears that they are falling behind the curve will sustain pressure on the FOMC to hike the Fed Funds rate. Technically the FXCM USDOLLAR has been locked in a falling wedge pattern since December and the reversal from Mondays low has reconfirmed the lower trendline. As the falling wedge approaches narrowing convergence; the FXCM USDOLLAR is facing an imminent breakout during the second quarter - with fundamentals poi...

USDCAD

A hawkish BoC has helped the CAD to recover grounds amidst favorable economic conditions, however pressure on oil prices following disappointment in OPEC production cut extension and widening IR Differential with the states will keep the pressure on the CAD for now. Key resistance levels at 1.3730  

US Dollar 2016-12-22

Exciting times await as the US Dollar rallied into 14-year highs as US Treasury yields rallied and the Dow Jones hit all-time highs following the most recent Fed DotPlot that charted a three-quarter rate hike during 2017, supported by evidence of Economic recovery accelerating in the US amidst strong GDP growth in the last quarter of 2016, strong job creation with unemployment dropping to a low of 4.6% and the outlook that Trumpenomics is about to spur on inflation when Trump takes office. Slipping by unnoticedly however is weak wage growth and bearish momentum in consumer spending habits and capacity utilization which will likely dampen the outlook from a three-quarter rate hike to a two-quarter rate hike during 2017, and as result the premium US Dollar stands to be corrected by at least 200 points as the market starts realizing the over pricing of the US Dollar. This is not the only risk factor when it comes to the pricing of the US Dollar to watch as free trade agreement ...