Trend-following with moving averages: a practical method

Trend-following with moving averages: a practical method

Trend-following with moving averages is a way to trade in the direction of the prevailing move, using one or two averages as a filter and as a place to look for pullbacks. A moving average is a lagging line: it summarises past closes and can only react after price has already moved. Used with a stop, a target or a trailing rule, and with position sizing, it can still provide a clear, repeatable method. This guide sets out a practical two-average approach and one clearly labelled illustrative entry on gold. The prices are a teaching example, not a real trade and not a signal.

How trend-following with moving averages works

Investopedia describes a moving average as a line that smooths past price data and can act as dynamic support in an uptrend or dynamic resistance in a downtrend. Traders also use a shorter average crossing a longer one as a trend filter. The popular 50-day and 200-day pair is widely watched on daily charts; on an H4 or H1 chart, traders often choose shorter lengths such as 20 and 50 so that the line actually relates to the swing they are trading. There is no official “correct” length. What matters is that you pick the lengths in advance and keep them fixed while you test the method.

A simple, durable framework is:

  • Trend filter. The market is treated as bullish only when the shorter average is above the longer average, and price is holding above both. It is treated as bearish only when the shorter is below the longer, and price is holding below both. When the averages are flat and tangled, there is no trend trade.
  • Pullback entry. In a bullish filter, wait for price to pull back toward the shorter average, or into the zone between the two averages, and then to turn back in the trend direction. Do not buy the first touch automatically; wait for a close that reclaims the average, or for a rejection your plan already defines.
  • Invalidation. A close through the longer average, or a flip of the two averages against the position, is a standard reason to exit or to tighten the stop. The exact rule must be written before the trade.

Moving averages lag, so they will get you in after the first part of a move and they will get you out after a turn has begun. That delay is the price of avoiding many counter-trend trades. In a sideways market the same lines will generate frequent false flips. The method is for trending conditions; when the averages flatten, the correct action is usually to stand aside.

A practical rule set for trend-following with moving averages

The worked example later uses a 20-period and a 50-period exponential moving average (EMA) on H4 gold. EMA weights recent closes more than a simple moving average does; you could use SMA instead, but you should not switch from one to the other mid-test. The rules are:

  • Trade long only when the 20 EMA is above the 50 EMA.
  • Wait for a pullback into the 20–50 EMA zone and a subsequent H4 close back above the 20 EMA.
  • Place the stop below the pullback low, and beyond the 50 EMA if that is farther.
  • Target at least 1.5R, or trail below a later swing low / below the 20 EMA once the trade is past 1R. Write one exit style and keep it.
  • Skip the setup if the next resistance sits too close to deliver 1.5R, or if a major scheduled release is about to hit and your plan does not include news.

Mirror the rules for shorts. Size every order from a fixed risk fraction of the account, using the actual stop distance, as described in the position-sizing guide in this series.

Worked example: an illustrative moving-average pullback on gold

Illustrative example only. The prices and average values below were constructed for teaching. They are not taken from a live chart and are not a signal.

Assume H4 XAUUSD. The 20 EMA is at $4,040 and the 50 EMA is at $4,010, so the filter is bullish. Price pulls back from $4,090 into the zone, makes a low at $4,018, and then closes at $4,048, back above the 20 EMA.

  • Illustrative entry: $4,048, the close back above the 20 EMA.
  • Illustrative stop loss: $4,005, below the pullback low and slightly below the 50 EMA at $4,010.
  • Risk: $43 per ounce.
  • Illustrative first target at 2R: $4,048 + (2 × $43) = $4,134, provided no marked resistance sits immediately in front of that price.
  • On a $10,000 account risking $100, size = $100 ÷ $43 ≈ 2.32 ounces, rounded down to a permitted contract size.

If the pullback had closed below the 50 EMA at $4,010, the filter would be in question and this long would be skipped. Chasing the break of $4,090 without a pullback is a different method and is not part of this rule set.

Trend-following with moving averages: an illustrative XAUUSD H4 pullback to the 20 and 50 EMA zone, with labelled entry, stop loss and 2R target

Common mistakes with moving-average trend following

  • Using the method in a tight range, where the averages cross often and every pullback is just noise.
  • Changing the periods after a losing week so that the last trade would have looked perfect.
  • Entering on the first touch of the average, without a close or a rejection.
  • Placing the stop on the average itself, where many other stops sit.
  • Treating a golden cross or death cross as a guaranteed reversal rather than as a lagging filter.

Trend-following with moving averages: an illustrative 20/50 EMA filter checklist for trend, pullback, invalidation and fixed lengths

FAQ

Should I use 20 and 50, or 50 and 200, for trend-following with moving averages?

It depends on the timeframe. A 50/200 pair is a staple on the daily chart and is watched by a large audience. On H4, 50 and 200 periods reach a long way back and may be too slow for a swing that lasts a few days. Pick one pair, test it on the timeframe you actually trade, and leave it fixed for the test.

Can I combine this method with support and resistance?

Yes. A pullback that also lands in a marked horizontal support zone is usually a cleaner location than a pullback in the middle of a range. The moving averages remain the trend filter; the zone helps you place the stop and the target.

Risk note: Trading gold, forex and CFDs with leverage carries a high risk of loss, including the loss of your entire deposit. This article is for information and education only and is not investment advice, not a personal recommendation and not a signal. The worked prices are illustrative. Past averages do not guarantee future results. Use only risk capital, set a stop loss before you enter, and never size a trade so that one loss can damage your finances.

Related: Position sizing and risk management: how to size a trade · Trading plan and journal: how to write both and use them · Support and resistance entries: how to plan a trade · Hammer candlestick pattern: how to identify it and an example entry

Sources: Investopedia — Moving Average (MA); Investopedia — Support and Resistance Basics

A note from TopFundTrading

Trading gold, forex and CFDs with leverage carries a high risk of loss, including the loss of your entire deposit. This article is for information and education only and is not investment advice.

If you want to trade larger capital without risking your own savings, you can consider a funded-trader challenge. WeMasterTrade is listed #1 (9.7/10) in TopFundTrading’s own prop-firm ranking – our editorial listing, not an independent rating.

Sign up for a WeMasterTrade account now

Referral link: topfundtrading.com may earn a commission if you sign up through this link.

Leave a Reply

Your email address will not be published. Required fields are marked *

Left Banner
Right Banner