Article Hero

Lesson 2: Moving Average

10 minutes
Miguel A. Rodriguez
Miguel A. Rodriguez
20 March 2024
The moving average is a popular technical analysis tool. Used to identify trends, it is one of the most used indicators across all financial markets.

Technical indicators can make a big difference while trading. Among the most popular strategies used to indicate emerging and common trends is calculating the moving average (MA). 

What Are Moving Averages?

A moving average is simply a way to smooth out price fluctuations to help you distinguish between typical market “noise” and actual trend reversals.  

Moving average lines for a given period don’t plot the price at a given moment. Instead, each point on these lines is the average closing price for a certain number of prior completed periods. 

For example, at any given point in time, a 200-period Moving Average plots the average price over the past 200 periods. On a daily chart, the 200-period Moving Average is comprised of a series of average closing prices for the past 200 days.  

Moving Average
Source: WebTrader

As each new closing price is added, the oldest one is dropped from the calculation, hence the term Moving Average. In other words, what makes these Moving Averages is that for each new candlestick, the calculation replaces the oldest closing price with the latest one.  

Moving Averages Type and Formula 

It’s also important to note that there are two main types of Moving Averages (MA); exponential moving average (EMA) and simple moving average (SMA). 

Simple Moving Average (SMA) Formula 

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: 

SMA = (P1 + P2 + P3 + P4 + ... + Pn) / n 

For example, a four-period 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 platforms like CAPEX WebTrader calculate this for you. Simply select the SMA indicator from the list of trading indicators, for example, apply it to the chart, and adjust the Moving Average period. 

You typically adjust the indicators in the Moving Average Settings.  

Exponential Moving Average (EMA) Formula 

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. 

EMA = [Close - previous EMA] * (2 / n+1) + previous EMA 

For example. a four-period 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 Moving Average settings and adjust how many periods the indicator should calculate, for example, 15, 50 or 100 periods. 

Advantages of Moving Averages 

Moving Average indicators has two advantages over the other types of trend lines. 

  1. They clarify trend direction: As a series of average prices over a given period rather than real-time prices, Moving Averages filter out random price movements and present a smoother, clearer picture of the trend for the period they cover versus the series of candlesticks. Because Moving Averages are dynamic and changing trend lines, Moving Averages can provide a useful look at the more subtle price fluctuations within the overall trend that hand-drawn straight trend lines or channels will miss.
  2. They are often more reliable support and resistance lines because everyone’s Moving Averages look the same: They’re built from an objective mathematical formula, so unlike trend and channel lines, a given type and duration of Moving Average for a given time frame looks the same on everyone’s chart and presents the same picture of trend and support/resistance for all viewing it. That is a valuable attribute. By watching the most widely followed Moving Averages and some of the best trading indicators, you have a better understanding of the moving averages and what the rest of the herd believes to be the support/resistance lines. That allows you to anticipate and exploit their moves. 

Moving Averages Examples 

The 5-, 10-, 20-, 50-, 100-, and 200-period Moving Averages are widely followed in most markets and time frames. They are the standard sampling of shorter and longer-duration Moving Averages and provide a degree of self-fulfilling prophecy. They indicate support/resistance because traders believe they are support/resistance points.  

The longer Moving Averages periods are particularly popular support/resistance indicators. For example, even the mainstream financial press aimed at laymen will usually mention if a major stock index crosses it's 50- or 200- day Moving Average. Financial media will quickly note if a major pair hits or crosses one of the longer-duration Moving Averages like its 50-, 100-, or 200-day Moving Average. Similarly, because Moving Averages in longer time-frames are older, 20-, 50-, or 200-day, week, and month Moving Averages get more attention because they provide much more significant support/resistance than those durations in shorter time frames. 

By all means, tinker with slight variations on these. For example, some prefer to shorten their sampling period to get a head start on the crowd (at the risk of getting a premature, false signal). Slightly longer or shorter sampling periods have their advantages and disadvantages. The following is a summary. 

Using Moving Averages in Trading  

To understand and use Moving Averages in online trading, you need to understand the relative strengths and weaknesses of the longer- and shorter Moving Averages periods, and the older ones you’ll see on daily to monthly charts versus the younger Moving Averages in the shorter time frames.  
Here’s what you need to know in order to decide what moving average setting to use. 

Shorter Durations (5, 10, 20 Periods): More Responsive to Price Changes, Weaker, Less Significant Support/Resistance 

The advantages: 

  • More responsive to price changes and are quicker to indicate a change in trend. 
  • Are better at showing short-term trends. 
  • May provide warning of trend changes when they cross longer duration Moving Averages. 

The disadvantages: 

  • Weaker, less significant support/resistance, so they don’t provide as reliable signals of trend continuation or reversal as the longer-duration Moving Averages when they are breached or when they hold. 
  • Shorter-duration MAs don’t display the overall trend as well as longer duration Moving Averages when prices are bouncing around because the shorter duration Moving Averages follow each price move so closely. 

Longer Duration (50, 100, 200 Periods): Less Responsive to Price Changes, Stronger, More Significant Support/Resistance 

The advantages: 

  • Stronger, more significant support/resistance provide more reliable signals of trend continuation or reversal when they are breached or when they hold. 
  • They are better than the shorter-duration MAs at displaying the overall trend when prices are volatile because a more sustained trend is needed to move these MAs. 

The disadvantages: 

  • The longer the duration, the further they lag current price action. 

The Same Advantages and Disadvantages Apply When Comparing Younger versus Older Moving Averages. 

The same durations on longer time frame charts are older than those on shorter time frame charts. Thus a 200-day Moving Average is a much more significant support/resistance than a 200-hour Moving Average but is less responsive to price and trend changes. 

Learn more about technical analysis techniques at CAPEX Academy. 

Examples of Moving Averages Behavior 

Let’s look at some examples of how long- and short-term Simple Moving Averages behave. In the Figures below, the shorter the Moving Averages, the more closely they follow price. The longer the Moving Averages, the smoother they are and the less often they tend to be breached.

Moving Averages example
Source: WebTrader

This is a EURUSD weekly chart, meaning each candlestick shows a week’s price movement for the Euro-USD currency pair.  

Notice how: 

  • Shorter-term Moving Average shows price changes faster than longer-term Moving Average: The shortest duration 10-period Moving Average (orange) follows the price more closely than the others, whereas the longer-duration 50 (green) and 200-period (black) Moving Averages are progressively more smoothed, with the 200-period Moving Average almost flat, reflecting how minimal the net price was over the period shown despite the volatility. That’s a potentially crucial point that you might have missed by looking at only the candles.  
  • Longer-term Moving Averages provide better support/resistance: The shorter-duration 10-week Moving Average is breached several times, far more often than the 50-week (two times) or 200-week.  
  • Shorter duration Moving Averages are less reliable support/resistance than longer ones. 

Moving Averages Trading Strategies  

Though you should watch the most popular Moving Averages, traders can and do experiment with less or more radical variations on these. Some will use slightly shorter duration Moving Averages when seeking more responsive trend lines to catch trend changes before the rest of the crowd but at a cost of catching more false signals. Others will opt for slightly longer durations to filter out all but the most proven trends. That may reduce the number of losing trades at a cost of missing some moves or accepting reduced profits on winning trades due to later entries and exits. The best moving average period for you will depend on your risk tolerance, skill level, ability to monitor trades in real-time, and thus your chosen time frame and trading style.  

There are two common types of moving average strategies - crossovers used in the moving average method to signal trend reversals. 

  1. The price itself crosses over or under a moving average.
  2. Shorter-duration moving averages cross over or under longer, slower-moving averages. 

Each type signals changing the momentum that could be the start of a new trend. 

Price Crosses Over or Under a Moving Average 

The first moving average method and type of Moving Average crossover is when the price moves through an important moving average. For example, see the Figure below. When the price moves below its 50-period simple moving average or SMA, it’s a sign the trend may be moving lower. When the price moves above its 50-period SMA, it’s a sign that the trend may be reversing higher. 

Moving averages price crosses
Source: WebTrader 

 Two points to remember with this moving average strategy: 

  1. Adjust your risk appetite to market conditions. If your technical analysis makes you confident in the trend, you should be more inclined to open partial positions based on whatever moving average crossover tends to signal the start of a trend.  
  2. Which moving average should price cross over to give you a signal for a new trend? While we used the 50-period SMA in the example, that will depend on which one(s) you find provide(s) the best results: that is, those moving averages that provide signals early enough to catch most of the move, but not so early that you get more false signals than you’re willing to accept. 

Moving Averages Crosses Each Other 

The other type of trend reversal indicator using moving average crossovers is when: 

  • A shorter duration moving average crosses over a slower, longer duration moving average, signaling upward, bullish momentum. 
  • A shorter-duration moving average crosses under a slower, longer-duration moving average, signaling downward, bearish momentum.  

The death cross and golden cross provide one such strategy, with the 50-day and 200-day moving averages in play. The bearish form comes when the 50-day SMA crosses below the 200-day SMA, providing a sell signal. Conversely, a bullish signal comes when the 50-day SMA breaks above the 200-day SMA.  

Moving averages cross
Source: WebTrader 

What you need to know before using Moving Averages 

Trading has nothing to do with discerning what logically should happen. Instead, it’s all about anticipating what the crowd will do and doing it first in your chosen time frame before they bid up to your entry price or bid down your selling price.  

Don’t Think: What logically should happen? 

Think: What will the crowd think the other traders will do? 
This kind of thinking is important for swing trades meant to be concluded within a few days at most, or with scalping and day trading. 

Also, it is important to remember that you must confirm a signal in some way. If you are getting a ‘buy’ signal from an indicator and a ‘sell’ signal from the price action, you need to use different indicators, or different time frames until your signals are confirmed. 

Another thing to keep in mind is that you must never lose sight of your trading strategy. Your rules for trading should always be implemented when using indicators. 

To practice using trading indicators, try CAPEX’s demo account. 

Or, if you are ready to start trading, open a live account. 






Miguel A. Rodriguez
Miguel A. Rodriguez

Miguel worked for major financial institutions such as Banco Santander, and Banco Central-Hispano. He is a published author of currency trading books.