Moving Averages: A Practical Guide with Examples for Effective Trading

In finance and trading, the moving average is a vital tool. It helps traders and investors understand market trends and make decisions.

In this article, we'll explore moving averages, what they do, how to read them, and how they give important signals. Whether you're new to trading or experienced, knowing about moving averages can greatly improve your ability to analyse markets and make smart decisions.

moving average trading

Moving average in technical analysis

Moving averages are a fundamental tool in technical analysis used to assess trends in the prices of financial instruments. Unlike traditional trendlines drawn on charts, moving averages rely on precise price data and simple calculations to create trend indicators.

Moving averages played a crucial role in shifting technical analysis from a manual chart-drawing approach to a more algorithmic one, involving calculations to draw trend lines on charts. For instance, you can observe an upward trend in stock price below by connecting the rising lows on a chart.

moving average example

What is a moving average and what it is used for?

The prices of financial instruments result from a complex blend of information interpreted differently by various market participants. As a result, prices don't follow a straight line but exhibit fluctuations or oscillations, often appearing erratic. The primary purpose of a moving average is to help us identify the underlying trend in a chart while smoothing out these erratic movements.

This smoothing effect is achieved by calculating a moving average based on a limited number of data points, typically within a range of 10 data points. On the other hand, longer moving averages serve to determine the prevailing trend by considering a more extensive history of price data.

For instance, in the chart above, the 200-period moving average applied to the stock price clearly highlights an upward trend.

moving average 200 periods

As you can see, the 10-period moving average closely aligns with the price trend (the green line), but it presents a smoother representation with fewer fluctuations. Meanwhile, the 200-period moving average effectively captures the primary ongoing trend (the blue line)

One important aspect to note about moving averages is their inherent delay compared to actual prices. This delay becomes more pronounced when calculated over a larger number of data points. However, this delay, rooted in the calculation methods, is largely compensated by the ease of interpreting a moving average compared to a raw price chart.

Commonly used periods in moving averages

There are multiple periods when creating moving averages and choosing the right one is a difficult task. The right type of moving average should be tailored to the market conditions, cycle, strategy, and type of asset, among others.

For example, a moving average that uses fewer periods (such as the 50-day moving average) reacts quickly to price changes, enabling early trend detection but may generate false signals if the trend reverses suddenly. Conversely, a longer moving average (such as a 200-day moving average) produces fewer false signals but might miss entry and exit points.

A median moving average, falling between the short and long ones, should ideally cover half of the dominant market cycle. For instance, in a 30-day market cycle, a recommended average might be 15 days.

The choice of moving average depends on the investor's profile. Long-term investors often favour a 200 or even 500-day average, as it aligns with longer trends. For near-term trends, traders may opt for five, 10, 20, or 50 days.

Moving average calculation: example

To calculate a moving average, you need price data for a specific financial instrument over a defined period. Prices can be sampled daily, weekly, monthly, or even at shorter intervals, such as hourly or every 15 minutes. The choice of timeframes depends on the asset and strategy.

Once you have this historical price data, the calculation is straightforward: you average a certain number of prices.

For example, a 5-period SMA would be calculated as:

SMA=(P1+P2+P3+P4+P5)/5

P1 is the price in the most recent period, P2 is the price in the period before P1, and so on, until P5, which is the price 5 periods ago. The number 5 in the denominator refers to the number of periods.

The SMA simply sums up the prices of the last 5 periods and divides by 5 to find the average. This type of moving average is called “simple” because it gives the same weight to every price point.

Types of moving averages: simple, exponential, weighted

A simple moving average is essentially calculated by adding all the data points and dividing by the number of data points. In other words, a SMA gives the same weight (importance) to all prices. However, some believe that the most recent prices are more important than prices further back in time – and this is where the weighted moving average comes in.

Weighted moving average: formula

A weighted moving average puts more weight (importance) on recent stock prices and less weight (importance) on past prices.

For simplicity reasons, let's assume you want to calculate the weighted moving average for 5 periods:

WMA = (P1 * 5) + (P2 * 4) + (P3 * 3) + (P4 * 2) + (P5 * 1) / (5 + 4+ 3 + 2 + 1)

P1 is the most recent price, P2 is the price before P1, and so on, until P5, which is the oldest price in this 5-period WMA. The numbers 1 to 5 are the weights assigned to the prices, with the most recent price having the highest weight.

The denominator is the sum of the weights, which is 5+4+3+2+1=15. This sum is what normalises the weighted average, ensuring that the weights sum to 1 (or 100%) when calculating the average.

So, the WMA gives you an average price where recent data is considered more influential, which some traders and analysts believe provides a more accurate reflection of the market sentiment during that specific period.

Exponential moving average: formula

The formula for a 5-period Exponential Moving Average (EMA) takes into account all previous data points while still giving more weight to recent prices.

Unlike the WMA, the EMA uses a different type of weighting that decreases exponentially for older prices.

EMA today​=(V today​×(S/(1+D)))+EMA yesterday​×(1−(S/(1+D)))

Where:

  • EMA today​ is the EMA for the current period. This is often just the simple average of the first set of periods being measured.
  • V today​ is the value (price) for the current period.
  • D is the number of periods, which is 5 in this case.
  • S is the smoothing constant, usually set to 2 for the calculation of EMA.
  • EMA yesterday​ is the EMA value from the previous period.

The smoothing factor S/(1+D) is crucial. For a 5-period EMA, it would be 2/(1+5), or 2/6, which simplifies to 1/3. This factor determines how much weight is applied to the most recent price.

The EMA will incorporate all past price data but the influence of past prices decreases exponentially over time, which is why it’s called an “exponential” moving average.

It's worth noting that investors or traders do not calculate moving averages manually. Many brokerage platforms and third-party platforms integrate these moving averages, which are calculated automatically.

These are not the only types of moving averages, although they are the most popular ones. Here are some other examples:

  • Volume Weighted Moving Average (VWMA): This moving average takes into account the volume during the given period, giving more weight to periods with higher trading volume.
  • Variable Moving Average (VMA): The VMA adjusts the weight on the data points based on the volatility of the prices, attempting to reduce lag and increase sensitivity to new prices.
  • Triangular Moving Average (TMA): The TMA is the average of an SMA, effectively double-smoothing the data, which tends to produce a smoother line that lags more than the SMA.
  • Hull Moving Average (HMA): The HMA speeds up the average with a clever weighting of the EMA, resulting in a fast-moving average that is smooth and responsive to the current price action.

Differences between moving averages: SMA, WMA, EMA

Here are some of the main differences between moving averages:

  • Sensitivity to price changes: SMA is the least sensitive (it is slower to detect trends). WMA is more sensitive than SMA (quicker to respond to price movements compared to an SMA), while EMA is the most sensitive to price changes (useful for identifying trends early).
  • Lag effect: SMA has the most lag, showing a delayed response to price changes. WMA has less lag, offering a more updated average. EMA has the least lag, closely tracking current prices.
  • Reaction to price spikes: SMA smooths out spikes for a more stable line. WMA can react more to price spikes than SMA but less than EMA. EMA reacts noticeably to spikes, which can sometimes be misleading.
  • Overreacting: SMA is less prone to overreacting to brief price changes. WMA may overreact more than SMA but less than EMA. EMA is the most prone to overreacting due to its focus on recent data.
  • Turning points: SMA signals turning points the slowest. WMA is quicker to signal than SMA. EMA signals the fastest, often ahead of actual market turns.
  • Crossover signals: SMA provides delayed signals, potentially missing early trend stages. WMA gives earlier signals than SMA, allowing for quicker action. EMA provides the earliest signals, which can catch trends early but also give false starts.

Overall, they serve different purposes. To avoid false signals, it's important to choose the right type for your asset and strategy. Always consider additional trend indicators to confirm the signal before making a decision.

Moving averages as trend indicators

As mentioned earlier in our analysis, moving averages serve as clear trend indicators. When the moving average is on the rise, and the prices remain above this average, it signals an evident uptrend.

Conversely, when the moving average declines and prices stay below it, it indicates a distinct downtrend.

It's essential to note that the number of data points used to calculate the moving average affects its sensitivity. However, it's crucial to maintain realistic expectations from any technical analysis indicator, including moving averages.

These indicators don't predict the future but help us interpret market behaviour. A key assumption of technical analysis is that if there is an ongoing trend (reflected in an increasing or decreasing moving average), it's more likely (though not guaranteed) that this trend will persist.

Moving average: trading signals

Moving average crossover

One prominent application of moving averages in trading involves the crossover (or intersection) between a short-term moving average and a medium/long-term one. The choice of specific short and medium/long periods is discretionary.

most used moving averages

When a short-term Simple Moving Average (SMA) crosses above a long-term SMA, it is often interpreted as a bullish signal, suggesting that it might be a good time to consider entering a long position.

Traders might choose to enter the trade near the closing price of the day when the crossover happens. They would typically stay in the position until a crossover in the opposite direction occurs, which might be several days later, indicating a potential shift in the trend.

It's important to note that such strategies are not foolproof and can lead to losses, especially if the market trend quickly reverses after the entry signal.

To improve the effectiveness of moving average crossover strategies, traders often conduct statistical analyses to determine the optimal short and long moving average periods for a particular financial instrument. These optimisations can be applied not only to simple moving averages but also to weighted moving averages and other types of moving averages.

Golden Cross and Death Cross

The Golden Cross and Death Cross are terms used in technical analysis, not just for analysis but also for trading signals. These occur when two simple moving averages (SMA)—commonly the 50-day and the 200-day—cross each other.

The 50-day moving average often represents medium-term trends, while the 200-day moving average is indicative of long-term trends. These indicators are frequently applied to broad market indices and to individual stocks, as well as to bonds and commodities with substantial trading volumes.

A Golden Cross happens when the 50-day moving average crosses above the 200-day average. This is seen as a bullish signal, suggesting a potentially strengthening medium-to-long-term uptrend. Such a signal can influence investors to anticipate a continuing uptrend and possibly increase their positions in the market.

Conversely, a Death Cross occurs when the 50-day moving average crosses below the 200-day average, which could indicate a medium-to-long-term downtrend, suggesting a weakening market.

While these indicators were given more weight in the past, their importance in today's market is debated. Some investors still consider them significant, whereas others believe their predictive power has diminished due to changes in market dynamics and the increased influence of algorithmic trading.

Parabolic SAR and moving average

The Parabolic SAR (Stop and Reverse) is a trading indicator that provides potential stop-loss levels and can indicate whether to take a long or short position. It appears on a chart as a series of dots placed either above or below the price bars. A dot below the price is typically seen as a bullish signal, and a dot above the price as a bearish signal.

When you filter these signals using a moving average, such as the 50-day moving average, you're determining the main trend's direction.

If the 50-day moving average is trending upwards and the price is above it, you might choose to consider only the bullish signals from the Parabolic SAR, aligning with the existing uptrend.

Conversely, if the moving average is trending downward and the price is below it, you might choose to consider only the bearish signals from the Parabolic SAR.

This combination helps to ensure that you trade in the direction of the prevailing trend, potentially increasing the odds of successful trades. It is a common strategy used to avoid acting on Parabolic SAR signals that go against the main market trend, as identified by the moving average.

most used moving averages

RSI and moving average

The moving average is a fundamental trend indicator, while the RSI highlights the oscillatory or cyclical aspect of the markets. To use the RSI in combination with the moving average, look for the price to cross the moving average and the RSI to cross the 50 level concurrently (see chart below).

trading with moving averages

If the price cuts the moving average upwards and the RSI exceeds the 50 level moving upwards as well (blue arrow), this can be considered a bullish entry signal. Conversely, if there's a downward price cut relative to the moving average and the RSI falls below the 50 level (red arrow), it might be a bearish signal.

Trading with the moving average: best brokers

IG

IG is one of the leading brokers in the online trading industry. Founded in 1974, the company has a consolidated presence internationally and offers access to a wide range of financial markets, including stocks, indices, forex, commodities and cryptocurrencies.

IG is known for its intuitive and easy-to-use trading platform, which offers advanced technical analysis tools and real-time financial news.

Access to trading is immediate, both through the website and through the mobile application. In addition, for more experienced traders, IG also offers the possibility of trading with CFDs and leveraged products.

Pepperstone

Pepperstone is an Australian broker founded in 2010, known for its specialisation in forex and CFD trading. It offers access to over 70 currency pairs, as well as indices, commodities, cryptocurrencies and stocks. Pepperstone is highly appreciated for its very fast execution speeds and competitive spreads.

The broker offers two of the most popular trading platforms: MetaTrader 4 and MetaTrader 5, in addition to its proprietary platform cTrader. These platforms are highly appreciated for their advanced features, including automated trading, detailed technical analysis and risk management tools. Pepperstone also offers extensive educational support, with a series of guides, tutorials and webinars to help traders of all levels of experience.

Best moving averages in forex trading

The key is to match the moving average to the type of trends and timeframes that best suit your trading approach. For instance:

  • Day traders might prefer shorter periods like 5-period, 10-period, or 20-period moving averages because they are more responsive to immediate price changes.
  • Swing traders may use medium-term moving averages such as the 50-period or 100-period to catch movements that last several days or weeks.
  • Long-term investors often look at the 200-period or 500-period moving averages to identify long-term trends.

In forex, many traders also pay attention to moving averages in different time frames. For example, a trader might look at the 200-period moving average on a 1-hour chart and a 4-hour chart to get a sense of longer-term trends while making trades on shorter time frames.

Summary

Overall, no moving average is inherently better than another. It is more about how well the trader uses the moving average in conjunction with their trading plan, risk management strategy, and the specific market dynamics of the asset they are trading.

It's also common to use more than one moving average at a time to get different perspectives on the market. Also, active traders should choose one of the best brokers for intraday trading to make sure they can implement such strategies.

To learn more about technical analysis, check out the following articles:

FAQs

What is the purpose of a moving average?

The primary purpose of a moving average is to smooth out price fluctuations in financial data, providing a clearer representation of underlying trends and patterns. It helps traders and analysts identify potential trend changes and make informed decisions in trading and investment.

How is the moving average interpreted?

The moving average is interpreted by observing its relationship with current price movements. When the price is above the moving average, it suggests an uptrend, while a price below the moving average indicates a downtrend, and crossovers can signal potential trend reversals or shifts in market sentiment.

What signals does the moving average provide?

The moving average provides signals for identifying trends and potential trend reversals. When the price crosses above the moving average, it generates a bullish signal, while a price crossing below it produces a bearish signal, and crossovers between short-term and long-term moving average can indicate entry and exit points in trading strategies.

Related Articles