Skip to content
Free
Open journalOpen
Forex trading

Forex Trend Following Strategy With 20 and 50 Period Moving Averages

Buy pullbacks in a trend defined by the 20 and 50 period averages, trail the stop with ATR, and size for the losing streaks this method brings.

7 min read

A forex trend following strategy buys pullbacks in an uptrend and sells rallies in a downtrend, then holds the winners with a trailing stop. A common version uses a 20 period and a 50 period moving average to define the trend and the pullback zone. The method usually loses on more trades than it wins, and relies on a smaller number of large winners. This guide gives an example rule set, a worked trade, when it fails, and how to size and test it on a prop firm account.

Key takeaways

  • Trade only in the direction the 20 and 50 period averages agree on, and enter on pullbacks, not on new highs.
  • Use a stop below the pullback low and a trailing stop based on ATR, with no fixed target.
  • Expect a low win rate and long losing streaks. Size for the streak, not for the average trade.
  • Trades last days, so swaps, weekend gaps and overnight daily loss checks all matter.

How does trend following with moving averages work?

A moving average smooths price so you can see the direction. When the faster 20 period average sits above the slower 50, and both slope up, the market has been making higher prices on balance. Trend followers assume that bias continues more often than not, and they lean on it.

Buying a fresh high in a trend puts your stop far away. Waiting for a pullback toward the 20 period average gives a closer stop and a better price. The trailing stop then lets a winner run for as long as the trend lasts. The losses are small and frequent. The wins are fewer but larger.

This example uses exponential moving averages, which react faster than simple ones, on a 4 hour chart. Both choices are common, not special.

An example rule set

These are example rules for testing, written for longs. Reverse every rule for shorts.

  1. Trend: the 20 EMA is above the 50 EMA, and the 50 EMA is higher than it was 10 bars ago.
  2. Pullback: price trades down to or below the 20 EMA but does not close below the 50 EMA.
  3. Trigger: wait for a bar that closes back above the 20 EMA. Place a buy stop 1 pip above that bar’s high.
  4. Initial stop: below the lowest low of the pullback, minus half of the 14 period ATR.
  5. Trailing stop: at each bar close, set the stop at the highest high since entry minus 3 × ATR. Move it up only, never down.
  6. Exit: when the trailing stop is hit, or a bar closes below the 50 EMA, whichever comes first.
  7. Limits: no more than one open trade per currency. Cancel an unfilled buy stop after three bars.

For more on why ATR buffers help, see our guide to stop loss placement with ATR.

Worked example: a EURUSD pullback long

Example figures on a 4 hour EURUSD chart. The 20 EMA is at 1.0920, the 50 EMA at 1.0880, and both are rising. The 14 period ATR is 20 pips.

  1. Price pulls back to a low of 1.0905, below the 20 EMA but above the 50.
  2. The next bar closes back above the 20 EMA with a high of 1.0932. The buy stop goes at 1.0933.
  3. Initial stop: 1.0905 minus 10 pips (half the ATR) gives 1.0895.
  4. Risk is 1.0933 minus 1.0895, which is 38 pips. With $400 of risk, size is $400 ÷ (38 × $10) = 1.05 lots, risking $399.

The trade fills and price rises to a high of 1.1010. The trail is 1.1010 minus 60 pips (3 × 20), which gives 1.0950. The stop is now above entry. Two days later the high is 1.1080 and the ATR has grown to 22 pips. The trail moves to 1.1080 minus 66 pips, which is 1.1014.

Price then drops and the stop fills at 1.1014. The gain is 1.1014 minus 1.0933, which is 81 pips. At 1.05 lots that is 81 × $10 × 1.05 = $850.50, about 2.1 times the risk, before swaps and costs.

Notice what the trailing stop cost. Price peaked 66 pips above the exit. Trend following always gives back part of each move. That is the price of staying in long enough to catch the big ones.

When does trend following fail?

Trend following loses most in ranges. When price chops sideways, the averages flatten and cross back and forth. Each pullback signal fails and stops out. A run of these is normal, and it is where most traders abandon the method.

  • Sharp reversals: news can flip a trend inside one bar, past your stop.
  • Late signals: by the time a 50 period average turns, part of the move is gone.
  • Crowded correlation: five long signals against the dollar are really one trade, and they fail together.

Here is an illustration of why streaks matter. Suppose a rule set wins 35% of trades, with an average win of 2.5R and an average loss of 1R. These are illustrative numbers, not results.

Expectancy = (0.35 × 2.5R) − (0.65 × 1R) = 0.875R − 0.65R = 0.225R per trade

That is positive, but the chance that any given run of eight trades are all losers is 0.65 to the power of 8, about 3%. Over a few hundred trades, a streak of eight is likely to show up. Our guide to risk to reward and expectancy explains the math.

How this fits prop firm rules

Size from the losing streak and the maximum loss first. Example figures: a $100,000 account with a $10,000 maximum loss. If you want room for 15 losses in a row, risk is about $650 per trade. The $400 in the example leaves room for 25. On a trailing drawdown, give yourself more room still.

  • Daily loss limit: trades are held overnight, so open losses count on days you are not watching. Add up the risk on all open trades and keep it well under the daily limit.
  • Reset rules: if a firm sets the daily floor from the higher of balance or equity, open profit carried past the reset raises the floor. A trailing stop that gives back that profit can use part of the next day’s limit.
  • Weekend and swap costs: some firms restrict weekend holding, and swaps add up over multi day trades.
  • Consistency rules: one large trend winner may be too big a share of total profit under some firms’ rules.

Rules vary by firm, so check each firm’s page in our forex prop firm list. For a slower method, firms with no daily loss limit or an end of day drawdown may suit better. Find an account in your budget that matches.

How to test a trend following system

  1. Test over at least five years and several pairs. Trends come and go, so short samples mislead.
  2. Include spreads, commissions and swaps on every trade, using rates close to what you will pay.
  3. Check nearby settings. If 20 and 50 work but 15 and 40 or 25 and 60 fall apart, the result is probably luck.
  4. Record the longest losing streak and the deepest drawdown, then compare them with the firm’s maximum loss.
  5. Forward test for at least a few months, because one trade can last a week or more.

Our guide on how to backtest a strategy walks through the record keeping step by step.

Questions traders ask

Is the 20 and 50 moving average crossover a good strategy?

A crossover alone is a slow trend filter, not a full strategy. It needs entry, stop, exit and sizing rules, and testing with costs, before you can judge it.

What timeframe is best for forex trend following?

The 4 hour and daily charts are common because costs are small relative to the moves. Lower timeframes trigger more trades, with more noise and a larger cost share per trade.

Should I take profit at a fixed target instead?

You can, but a fixed target caps the large winners that trend following depends on. Test both versions with the same entries and compare the results.

Trading carries a high risk of loss, and trend methods can go through long drawdowns. Strategy figures here are illustrations, not expected results. Most prop firm accounts are simulated. Nothing here is financial advice.

Discover more from PropFirmXchange

Subscribe now to keep reading and get access to the full archive.

Continue reading