Moving Averages - What Is a Moving Average?

Reading time: 3 minute(s)
  • A moving average is a trend-following indicator based on past prices.
  • A moving average is calculated by choosing certain periods and then dividing this number by the number of chosen periods.
  • Moving averages can help in smoothing out of price action.
  • Moving averages are used not only to identify the direction of the trend, but also for trade entry.

The two basic and most commonly used moving averages include the Simple Moving Average (SMA) and the Exponential Moving Average (EMA). The first is the simple average of a security over a defined number of time periods, while the second gives a greater weight to more recent prices.

The image below shows the SMA, which is formed by calculating the average price of a financial market over a chosen period of time.

Moving Averages

Source: xStation

The EMA, as demonstrated in the image below, applies more weight and significance to most recent prices, and less weight to older prices in the chosen period.

Moving Averages

Source: xStation

The image below shows a comparison between the SMA (blue line) and the EMA (orange line).

Moving Average

Source: xStation

Why use moving averages in trading

Moving averages are popular in technical market analysis, as they are able to smooth price data, form trend lines, and create an easily interpreted visual aid. They are especially well-suited for price charts and other indicators. Some of the advantages of using moving averages include:

  • Moving average is used for forecasting goods or commodities with constant demand, where there is a slight trend or seasonality.
  • Moving average is useful for separating out random variations.
  • Moving average can help you identify areas of support and resistance.
  • Simplicity of application and interpretation makes it possible to plot several different moving average lines at the same time.
  • Moving average gives constant forecasts.

Disadvantages of moving averages

  • No method is perfect, and moving average comes with its own set of disadvantages. Moving average:
  • Requires maintaining history of different time periods for each forecasted period.
  • Often overlooks complex relationships mentioned in the data.
  • Does not respond to the fluctuation that take place for a reason, for example cycles and seasonal impacts.

How to trade using moving averages

There are various methods of using moving averages in trading. Below we focus primarily on:

  • Using one moving average
  • Using two moving averages

1. Using One Moving Average

When one moving average is applied to the chart, then a buy signal is provided when the chart breaks the moving average from the bottom with the body of a candlestick. On the other hand, a sell signal is provided when the chart breaks the moving average from the top with the body of a candlestick.

Moving Average

Source: xStation

In the example above, a 50 period SMA was applied to Gold. As you can see, the market first provided a buy signal, after which the market gained in value. Later the market broke the SMA from the top providing a sell signal, after which the market lost in value.

2. Using Two Moving Averages

When two moving averages are used with two different periods, a buy signal is provided when the shorter term moving average breaks the longer term moving average from the bottom. On the other hand, a sell signal is provided when the shorter moving average breaks the longer term moving average from the top.

Source: xStation

In the example above, a 50-period SMA (blue line) and a 100-period SMA (white line) were applied on the DE30 chart. A buy signal was provided when the 50-period SMA broke the 100-period SMA from the bottom, after which the market gained in value.

Keep in mind, however, that all indicators and oscillators often provide false signals and should thus be used with other technical analysis tools. When all the tools you’ve used indicate the same direction for the market, this increases the probability of the success of the trade.

Join over 1 000 000 XTB Group Clients from around the world

The financial instruments we offer, especially CFDs, can be highly risky. Fractional Shares (FS) is an acquired from XTB fiduciary right to fractional parts of stocks and ETFs. FS are not a separate financial instrument. The limited corporate rights are associated with FS.
This page was not created for investors residing in Brazil. This brokerage is not authorized by the Comissão de Valores Mobiliários (CVM) or the Brazilian Central Bank (BCB). The content of this page should not be characterized as an investment offer in Brazil or for investors residing in that country.
Losses can exceed deposits

We use cookies

By clicking “Accept All”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts.

This group contains cookies that are necessary for our websites to work. They take part in functionalities like language preferences, traffic distribution or keeping user session. They cannot be disabled.

Cookie name
Description
SERVERID
userBranchSymbol Expiration date 25 October 2024
test_cookie Expiration date 24 October 2024
adobe_unique_id Expiration date 24 October 2025
__hssc Expiration date 24 October 2024
SESSID Expiration date 2 March 2024
__cf_bm Expiration date 24 October 2024
intercom-id-iojaybix Expiration date 21 July 2025
intercom-session-iojaybix Expiration date 31 October 2024
xtbCookiesSettings Expiration date 24 October 2025
TS5b68a4e1027
countryIsoCode
xtbLanguageSettings Expiration date 24 October 2025
userPreviousBranchSymbol Expiration date 24 October 2025
TS5b68a4e1027
intercom-device-id-iojaybix Expiration date 21 July 2025
__cf_bm Expiration date 24 October 2024
__cfruid
__cfruid
__cf_bm Expiration date 24 October 2024
__cf_bm Expiration date 24 October 2024
_cfuvid
adobe_unique_id Expiration date 24 October 2025
_cfuvid
TS5b68a4e1027
xtbCookiesSettings Expiration date 24 October 2025
SERVERID
TS5b68a4e1027
__hssc Expiration date 24 October 2024
test_cookie Expiration date 1 March 2024
__cf_bm Expiration date 24 October 2024
_cfuvid
_cfuvid
__cf_bm Expiration date 24 October 2024
__cf_bm Expiration date 24 October 2024

We use tools that let us analyze the usage of our page. Such data lets us improve the user experience of our web service.

Cookie name
Description
_gid Expiration date 9 September 2022
_gat_UA-98728395-1 Expiration date 8 September 2022
_gat_UA-121192761-1 Expiration date 8 September 2022
_gcl_au Expiration date 22 January 2025
_ga_CBPL72L2EC Expiration date 24 October 2026
_ga Expiration date 24 October 2026
__hstc Expiration date 22 April 2025
__hssrc
_vwo_uuid_v2 Expiration date 25 October 2025
_ga_TC79BEJ20L Expiration date 24 October 2026
_vwo_uuid Expiration date 16 October 2025
_vwo_ds Expiration date 15 November 2024
_vwo_sn Expiration date 16 October 2024
_vis_opt_s Expiration date 24 January 2025
_vis_opt_test_cookie
af_id Expiration date 23 February 2025
afUserId Expiration date 25 January 2026
af_id Expiration date 24 January 2026
AF_SYNC Expiration date 1 February 2024
_ga Expiration date 24 October 2026
_gid Expiration date 25 October 2024
_ga_CBPL72L2EC Expiration date 24 October 2026
__hstc Expiration date 22 April 2025
__hssrc
_ga_TC79BEJ20L Expiration date 24 October 2026
_gcl_au Expiration date 22 January 2025
AnalyticsSyncHistory Expiration date 31 March 2024

This group of cookies is used to show you ads of topics that you are interested in. It also lets us monitor our marketing activities, it helps to measure the performance of our ads.

Cookie name
Description
MUID Expiration date 18 November 2025
_omappvp Expiration date 6 October 2035
_omappvs Expiration date 24 October 2024
_uetsid Expiration date 25 October 2024
_uetvid Expiration date 18 November 2025
_fbp Expiration date 22 January 2025
fr Expiration date 7 December 2022
_ttp Expiration date 22 January 2025
_tt_enable_cookie Expiration date 22 January 2025
_ttp Expiration date 22 January 2025
hubspotutk Expiration date 22 April 2025
IDE Expiration date 10 November 2025
YSC
VISITOR_INFO1_LIVE Expiration date 22 April 2025
hubspotutk Expiration date 22 April 2025
_omappvp Expiration date 11 February 2035
_omappvs Expiration date 1 March 2024
_uetsid Expiration date 25 October 2024
_uetvid Expiration date 18 November 2025
_ttp Expiration date 22 January 2025
MUID Expiration date 18 November 2025
_fbp Expiration date 22 January 2025
_tt_enable_cookie Expiration date 22 January 2025
_ttp Expiration date 22 January 2025
li_sugr Expiration date 30 May 2024
guest_id_marketing Expiration date 24 October 2026
guest_id_ads Expiration date 24 October 2026
guest_id Expiration date 24 October 2026
muc_ads Expiration date 24 October 2026
VISITOR_PRIVACY_METADATA Expiration date 22 April 2025
MSPTC Expiration date 18 November 2025
IDE Expiration date 18 November 2025
MSPTC Expiration date 18 November 2025

Cookies from this group store your preferences you gave while using the site, so that they will already be here when you visit the page after some time.

Cookie name
Description
bcookie Expiration date 24 October 2025
lidc Expiration date 25 October 2024
UserMatchHistory Expiration date 31 March 2024
bscookie Expiration date 1 March 2025
li_gc Expiration date 22 April 2025
bcookie Expiration date 24 October 2025
li_gc Expiration date 22 April 2025
lidc Expiration date 25 October 2024
personalization_id Expiration date 24 October 2026

This page uses cookies. Cookies are files stored in your browser and are used by most websites to help personalise your web experience. For more information see our Privacy Policy You can manage cookies by clicking "Settings". If you agree to our use of cookies, click "Accept all".

Change region and language
Country of residence
Language