
Binarium
The Best Binary Options Broker 2020!
Perfect For Beginners!
Free Trading Education, Free Demo Account!
Get Your SingUp Bonus Now!
How to Use a Moving Average to Buy Stocks
The moving average (MA) is a simple technical analysis tool that smooths out price data by creating a constantly updated average price. The average is taken over a specific period of time, like 10 days, 20 minutes, 30 weeks or any time period the trader chooses. There are advantages to using a moving average in your trading, as well as options on what type of moving average to use. Moving average strategies are also popular and can be tailored to any time frame, suiting both longterm investors and shortterm traders.
Key Takeaways
 A moving average (MA) is a widely used technical indicator that smooths out price trends by filtering out the “noise” from random shortterm price fluctuations.
 Moving averages can be constructed in several different ways, and employ different numbers of days for the averaging interval.
 The most common applications of moving averages are to identify trend direction and to determine support and resistance levels.
 When asset prices cross over their moving averages, it may generate a trading signal for technical traders.
 While moving averages are useful enough on their own, they also form the basis for other technical indicators such as the moving average convergence divergence (MACD).
Moving Average
Why Use a Moving Average
A moving average helps cut down the amount of “noise” on a price chart. Look at the direction of the moving average to get a basic idea of which way the price is moving. If it is angled up, the price is moving up (or was recently) overall; angled down, and the price is moving down overall; moving sideways, and the price is likely in a range.
A moving average can also act as support or resistance. In an uptrend, a 50day, 100day or 200day moving average may act as a support level, as shown in the figure below. This is because the average acts like a floor (support), so the price bounces up off of it. In a downtrend, a moving average may act as resistance; like a ceiling, the price hits the level and then starts to drop again.
The price won’t always “respect” the moving average in this way. The price may run through it slightly or stop and reverse prior to reaching it.
As a general guideline, if the price is above a moving average, the trend is up. If the price is below a moving average, the trend is down. However, moving averages can have different lengths (discussed shortly), so one MA may indicate an uptrend while another MA indicates a downtrend.
Types of Moving Averages
A moving average can be calculated in different ways. A fiveday simple moving average (SMA) adds up the five most recent daily closing prices and divides it by five to create a new average each day. Each average is connected to the next, creating the singular flowing line.
Another popular type of moving average is the exponential moving average (EMA). The calculation is more complex, as it applies more weighting to the most recent prices. If you plot a 50day SMA and a 50day EMA on the same chart, you’ll notice that the EMA reacts more quickly to price changes than the SMA does, due to the additional weighting on recent price data.
Charting software and trading platforms do the calculations, so no manual math is required to use a moving average.
One type of MA isn’t better than another. An EMA may work better in a stock or financial market for a time, and at other times, an SMA may work better. The time frame chosen for a moving average will also play a significant role in how effective it is (regardless of type).
Moving Average Length
Common moving average lengths are 10, 20, 50, 100 and 200. These lengths can be applied to any chart time frame (one minute, daily, weekly, etc.), depending on the trader’s time horizon.
The time frame or length you choose for a moving average, also called the “look back period,” can play a big role in how effective it is.
An MA with a short time frame will react much quicker to price changes than an MA with a long look back period. In the figure below, the 20day moving average more closely tracks the actual price than the 100day moving average does.

Binarium
The Best Binary Options Broker 2020!
Perfect For Beginners!
Free Trading Education, Free Demo Account!
Get Your SingUp Bonus Now!
The 20day may be of analytical benefit to a shorterterm trader since it follows the price more closely and therefore produces less “lag” than the longerterm moving average. A 100day MA may be more beneficial to a longerterm trader.
Lag is the time it takes for a moving average to signal a potential reversal. Recall that, as a general guideline, when the price is above a moving average, the trend is considered up. So when the price drops below that moving average, it signals a potential reversal based on that MA. A 20day moving average will provide many more “reversal” signals than a 100day moving average.
A moving average can be any length: 15, 28, 89, etc. Adjusting the moving average so it provides more accurate signals on historical data may help create better future signals.
Trading Strategies – Crossovers
Crossovers are one of the main moving average strategies. The first type is a price crossover, which is when the price crosses above or below a moving average to signal a potential change in trend.
Another strategy is to apply two moving averages to a chart: one longer and one shorter. When the shorterterm MA crosses above the longerterm MA, it’s a buy signal, as it indicates that the trend is shifting up. This is known as a “golden cross.”
Meanwhile, when the shorterterm MA crosses below the longerterm MA, it’s a sell signal, as it indicates that the trend is shifting down. This is known as a “dead/death cross.”
MA Disadvantages
Moving averages are calculated based on historical data, and nothing about the calculation is predictive in nature. Therefore, results using moving averages can be random. At times, the market seems to respect MA support/resistance and trade signals, and at other times, it shows these indicators no respect.
One major problem is that, if the price action becomes choppy, the price may swing back and forth, generating multiple trend reversal or trade signals. When this occurs, it’s best to step aside or utilize another indicator to help clarify the trend. The same thing can occur with MA crossovers when the MAs get “tangled up” for a period of time, triggering multiple losing trades.
Moving averages work quite well in strong trending conditions but poorly in choppy or ranging conditions. Adjusting the time frame can remedy this problem temporarily, although at some point, these issues are likely to occur regardless of the time frame chosen for the moving average(s).
The Bottom Line
A moving average simplifies price data by smoothing it out and creating one flowing line. This makes seeing the trend easier. Exponential moving averages react quicker to price changes than simple moving averages. In some cases, this may be good, and in others, it may cause false signals. Moving averages with a shorter look back period (20 days, for example) will also respond quicker to price changes than an average with a longer look back period (200 days).
Moving average crossovers are a popular strategy for both entries and exits. MAs can also highlight areas of potential support or resistance. While this may appear predictive, moving averages are always based on historical data and simply show the average price over a certain time period.
Investing using moving average, or any technique requires an investment account with a stockbroker. Investopedia’s list of the best online brokers is a great place to start your research on the broker that fits your needs the most.
How Is the Exponential Moving Average (EMA) Formula Calculated?
The exponential moving average (EMA) is a technical chart indicator that tracks the price of an investment (like a stock or commodity) over time. The EMA is a type of weighted moving average (WMA) that gives more weighting or importance to recent price data. Like the simple moving average, the exponential moving average is used to see price trends over time, and watching several EMAs at the same time is easy to do with moving average ribbons.
Calculating SMA and EMA
The exponential moving average is designed to improve on the idea of a simple moving average (SMA) by giving more weight to the most recent price data, which is considered to be more relevant than older data. Since new data carries greater weight, the EMA responds more quickly to price changes than the SMA.
Key Takeaways
 Exponential moving averages are designed to see price trends over specific time frames like 50 or 200 days.
 Compared to simple moving averages, EMAs give greater weight to recent (more relevant) data.
 Computing the exponential moving average involves applying a multiplier to the SMA.
 Moving average ribbons allow traders to see multiple EMAs at the same time.
The formula for calculating the EMA is a matter of using a multiplier and starting with the SMA. There are three steps in the calculation (although chart applications do the math for you):
 Compute the SMA
 Calculate the multiplier for weighting the EMA
 Calculate the current EMA
The calculation for the simple moving average is the same as computing an average or mean. That is, the SMA for any given number of time periods is simply the sum of closing prices for that number of time periods, divided by that same number. So, for example, a 10day SMA is just the sum of the closing prices for the past 10 days, divided by 10.
The mathematical formula looks like this:
The formula for calculating the weighting multiplier looks like this:
(In both cases, we’re assuming a 10day SMA.)
So, when it comes to calculating the EMA of a stock:
The weighting given to the most recent price is greater for a shorterperiod EMA than for a longerperiod EMA. For example, an 18.18% multiplier is applied to the most recent price data for a 10day EMA, as we did above, whereas for a 20day EMA, only a 9.52% multiplier weighting is used. There are also slight variations of the EMA arrived at by using the open, high, low, or median price instead of using the closing price.
Using the EMA: Moving Average Ribbons
Traders sometimes watch moving average ribbons, which plot a large number of moving averages onto a price chart,rather than just one moving average. Though seemingly complex based on the sheer volume of concurrent lines, ribbons are easy to see on charting applications and offer a simple way of visualizing the dynamic relationship between trends in the short, intermediate, and long term.
Traders and analysts rely on moving averages and ribbons to identify turning points, continuations, overbought/oversold conditions, to define areas of support and resistance, and to measure price trend strengths.
Defined by their characteristic threedimensional shape that seems to flow and twist across a price chart, moving average ribbons are easy to interpret. The indicators trigger buy and sell signals whenever the moving average lines all converge at one point. Traders look to buy on occasions when shorterterm moving averages cross above the longerterm moving averages from below and look to sell when shorter moving averages cross below from above.
How to Create a Moving Average Ribbon
To construct a moving average ribbon, simply plot a large number of moving averages of varying time period lengths on a price chart at the same time. Common parameters include eight or more moving averages and intervals that range from a twoday moving average to a 200 or 400day moving average.
For ease of analysis, keep the type of moving average consistent across the ribbon—for example, use only exponential moving averages or only simple moving averages.
When the ribbon folds—all of the moving averages converge into one close point on the chart—trend strength is likely weakening and possibly pointing to a reversal. The opposite is true if the moving averages are fanning and moving apart from each other, suggesting that prices are ranging and that a trend is strong or strengthening.
Downtrends are often characterized by shorter moving averages crossing below longer moving averages. Uptrends, conversely, show shorter moving averages crossing above longer moving averages. In these circumstances, the shortterm moving averages act as leading indicators that are confirmed as longerterm averages trend towards them.
The Bottom Line
The preferred number and type of moving averages can vary considerably between traders, based on investment strategies and the underlying security or index. But EMAs are especially popular because they give more weight to recent prices, lagging less than other averages. Some common moving average ribbon examples involve eight separate EMA lines, ranging in length from a few days to multiple months.
Simple, Exponential, and Weighted Moving Averages
Day Trading Uses and Applications of Moving Averages
Moving averages act as a technical indicator to show you how a security’s price has moved, on average, over a certain period of time. Moving averages are often used to help highlight trends, spot trend reversals, and provide trade signals. There are several different types of moving averages, but they all create a single smooth line that can help show you which direction a price is moving.
Simple Moving Average Calculation
The simple moving average (SMA) calculates an average of the last n prices, where n represents the number of periods for which you want the average:
Simple moving average = (P1 + P2 + P3 + P4 + . + Pn) / n
For example, a fourperiod SMA with prices of 1.2640, 1.2641, 1.2642, and 1.2641 gives a moving average of 1.2641 using the calculation (1.2640 + 1.2641 + 1.2642 + 1.2641) / 4 = 1.2641.
While knowing how to calculate a simple average is a good skill to have, trading and chart platforms calculate this for you. Simply select the SMA indicator from the list of charting indicators, apply it to the chart, and adjust the number of periods you want to use.
You typically make adjustments to the indicators in the Settings menu section of a trading platform. On many platforms, you can locate the settings by doubleclicking on the indicator itself.
The advantage of an SMA is that you know exactly what you are getting. The SMA value equals the average price for the number of periods in the SMA calculation.
Common SMA values are eight, 20, 50, 100, and 200. For example, if using a 100period SMA, the current value of the SMA on the chart is the average price over the last 100 periods or price bars.
This chart shows a 50period SMA, along with an exponential moving average (EMA) and a weighted moving average (WMA) on a oneminute stock chart. Due to their different calculations, the indicators appear at different price levels on the chart.
Exponential Moving Average Calculation
The exponential moving average (EMA) is a weighted average of the last n prices, where the weighting decreases exponentially with each previous price/period. In other words, the formula gives recent prices more weight than past prices.
Exponential moving average = (Close – previous EMA) * (2 / n+1) + previous EMA
For example, a fourperiod EMA with prices of 1.5554, 1.5555, 1.5558, and 1.5560, with the last value being the most recent, gives a current EMA value of 1.5558 using the calculation (1.5560 – 1.5558) x (2/5) + 1.5558 = 1.55588.
As with the SMA, charting platforms do all the EMA calculations for you. Select the EMA from the indicator list on a charting platform and apply it to your chart. Go into the settings and adjust how many periods the indicator should calculate, such as 15, 50, or 100 periods.
The EMA adapts more quickly to price changes than the SMA. For example, when a price reverses direction, the EMA will reverse direction quicker than the SMA. This takes place because the EMA formula gives more weight to recent prices, and less weight to prices that occurred in the past.
Weighted Moving Average Calculation
The weighted moving average (WMA) gives you a weighted average of the last n prices, where the weighting decreases with each previous price. This works similarly to the EMA, but you calculate the WMA differently.
Weighted moving average calculation = (Price * weighting factor) + (Price previous period * weighting factor1)
WMAs can have different weights assigned based on the number of periods used in the calculation. If you want a weighted moving average of four different prices, then the most recent weighting could be 4/10, the period before could have a weight of 3/10, the period before that could have a weighting of 2/10, and so on.
The “10” in that scenario is a randomly chosen number. A weight of 4/10, for example, means the most recent price will account for 40% of the value of the WMA. The price three periods ago only accounts for 10% of the WMA value.
For the following example, assume prices of 90, 89, 88, 89, with the most recent price first. You would calculate this as [90 x (4/10)] + [89 x (3/10)] + [88 x (2/10)] + [89 x (1/10)] = 36 + 26.7 + 17.6 + 8.9 = 89.2
You can customize the weighted moving average more than the SMA and EMA. The most recent price points are usually given more weight, but it could also work the other way, where you give historical prices more weight.
Moving Average Trading Uses and Interpretation
Moving averages can be used for both analysis and trading signals.
For analysis, all the moving averages help highlight the trend. When the price is above its moving average, it shows that the price is trading higher than it has, on average, over the period being analyzed. That helps confirm an uptrend. When the price sits below its moving average, this shows that the price is trading lower than it has, on average, over the period being analyzed. That helps confirm a downtrend.
When the price crosses above its moving average, this shows the price is getting stronger relative to where it was in the past because the most recent price now sits higher than the average. If the price crosses below its moving average, it shows the price is getting weaker relative to where it was in the past.
One longerterm and one shorterterm moving average—for example, 20 and 50 periods—can be added to a chart simultaneously. When the 20period moving average crosses above the 50, it indicates that shortterm price momentum is moving to the upside. When the 20period moving average crosses below the 50, it indicates that the shortterm price momentum is moving to the downside.
Moving averages can also be incorporated with other indicators to provide trade signals. An EMA can provide buy signals when combined with Keltner Channels. A strategy may include buying near the EMA when the trend is up and the price is pulling back from the top of the Keltner Channel.
One type of moving average isn’t inherently better than others; they just calculate the average price differently. Depending on the strategy you’re using, one type of moving average may work better than another. Try out different moving average combinations and see which provides you with the best results.
You may find that, for each market, you need to adjust your settings slightly. A 50period SMA may provide great signals on one stock, for example, but it doesn’t work well on another. Or a 20period EMA may help isolate the trend on one futures contract, but not another. All the moving averages are just tools, and interpreting them is up to the trader because no indicator works well all the time or in all market conditions.
The Balance does not provide tax, investment, or financial services and advice. The information is being presented without consideration of the investment objectives, risk tolerance or financial circumstances of any specific investor and might not be suitable for all investors. Past performance is not indicative of future results. Investing involves risk including the possible loss of principal.

Binarium
The Best Binary Options Broker 2020!
Perfect For Beginners!
Free Trading Education, Free Demo Account!
Get Your SingUp Bonus Now!