Open a Demo Trading Account With DeltaStock
myforexdot.org.uk logo

[ Home | Technical Trading Systems | Trading Articles | Misc Articles | FX Brokers | Disclaimer | Links ]



Forex Trend Analysis – The Best Trend Filter


Finding the best trend filter for Forex trading,

The saying "the trend is your friend" is probably the most well known and important piece of advice when it comes to trading markets that trend well like the large FX pairs, but what is the best method of determining the direction of the long-term underlying trend? After all, the trend is only your friend "until it bends" as they say; so it is important to use the most reliable trend detection indicator/filter there is.

This is not the first article on finding the best method for determining the direction of the long-term underlying trend that I have posted on this website. Other articles on the importance of the trend, how to best make use of it and how to decide on its direction that I have written include –

  • Trend trading where I compared trading the trend with trading using support and resistance and how the two trading strategies could be used together.
  • Forex trend indicators where I compared, simple moving averages with Donchian channels and comparing the current price to the past price.
  • Moving averages Vs. Lookbacks where I compared the effectiveness of moving averages with the effectiveness of comparing current price to past price.
But with an issue as important as the trend is in Forex trading you can never have enough data, so I'd like to do more tests; and in this article I am going to compare how a number of different long-term trend filters improves a simple duel 3-day and 5-day simple moving average crossover system on the EUR/USD currency pair.


An example of a down trend with a short break in the trend
EUR/USD A Temporary Break In The Trend
The trend is down despite a temporary break. Most long trades fail.


The effects of a trend filter calling the trend as down on the example above
The example above with a trend filter
A trend filter prevents every bad trade bar two and only causes us to miss out on a single good trade.


I will test three types of long-term trend filters, simple moving averages, comparing current price to past price, and most recent breakout filters. I will test these three trend filters with four sets of experiments, the experiments are as follows –


Experiment #1: Trading with no trend filter,

I will go long when the 3-day simple moving average crosses above the 5-day simple moving average and the closing price is above the 3-day SMA. Long trades will be left open until the 3-day SMA closes below the 5-day SMA and the price closes below the 3-day SMA. Likewise, I will go short when the 3-day simple moving average crosses below the 5-day simple moving average and the closing price is below the 3-day SMA. Short trades will be left open until the 3-day SMA closes above the 5-day SMA and the closing price is above 3-day SMA. This system is always in the market as when long trades are closed out they are immediately replaced by short trades and vice verse.


Experiment #2: Trading with a simple moving average trend filter,

I will modify the system used in experiment #1 by adding a much longer simple moving average which is to be used as a trend filter. Long trades will only be taken when the closing price is also above the long-term simple moving average and short trades will only be taken when the closing price is also below the long-term simple moving average. I will test three different lengths of long-term moving averages, a 50-day SMA, a 100-day SMA and a 200-day SMA. Unlike the system in experiment #1 this system will not always be in the market.


Experiment #3: Trading with a 'lookback' past price trend filter,

I will modify the system used in experiment #1 by adding a 'lookback' which is to be used as a trend filter. A lookback trend filter simply means that we will compare the most recent closing price to the closing price x-number of days ago. Long trades will only be taken when the closing price is also higher than the closing price x-number of days ago and short trades will only be taken when the closing price is also lower than the closing price x-number of days ago. I will test three different lengths of time for the lookback filters, 30-days, 60-days and 120-days. Unlike the system in experiment #1 and like the system in experiment #2 this system will not always be in the market.


Experiment #4: Trading with a 'breakout' trend filter,

I will modify the system used in experiment #1 by adding a 'breakout' trend filter. A breakout trend filter simply means that we will look at when the price last made a new significant high or low closing price, i.e. when the price last closed higher than it has ever closed in the previous x-number of days and when it last closed lower than it has ever closed in the previous x-number of days. If the price made a new closing price high more recently than it made a new closing price low then we will only take long trades; and likewise, if the price made a new closing price low more recently than it made a new closing price high then we will only take short trades. I will test three different lengths of time for the breakout filters, 30-days, 60-days and 120-days. Unlike the system in experiment #1 and like the systems in experiments #2 and #3 this system will not always be in the market.


The Results,

I will test how this system would have performed over the last decade from the beginning of the year 2002 to the end of 2011. The results are as follows –

Experiment #1: (Trading with no trend filter results),
Number of Winning Trades Number of Losing Trades Percentage of Trades That Are Winners Number of Pips Won Number of Pips Lost Win To Loss Ratio Full Results
269 152 36.10% 31,047 30,004 1.035 to 1 HERE

Experiment #2: (Trading with a simple moving average results),
SMA Time Number of Winning Trades Number of Losing Trades Percentage of Trades That Are Winners Number of Pips Won Number of Pips Lost Win To Loss Ratio Full Results
50-days 100 173 36.63% 22,047 18.452 1.195 to 1 HERE
100-days 96 167 36.50% 20,039 18,191 1.102 to 1 HERE
200-days 89 144 38.20% 18,388 15,385 1.195 to 1 HERE

Experiment #3: (Trading with a 'lookback' past price trend filter results),
Lookback Time Period Number of Winning Trades Number of Losing Trades Percentage of Trades That Are Winners Number of Pips Won Number of Pips Lost Win To Loss Ratio Full Results
30-days 102 166 38.06% 21,807 17,033 1.280 to 1 HERE
60-days 86 171 33.46% 18,440 17,803 1.036 to 1 HERE
120-days 91 141 39.22% 18,901 14,946 1.265 to 1 HERE

Experiment #4: (Trading with a 'breakout' trend filter results),
Breakout Time Period Number of Winning Trades Number of Losing Trades Percentage of Trades That Are Winners Number of Pips Won Number of Pips Lost Win To Loss Ratio Full Results
30-days 80 148 35.09% 15,171 16,878 0.899 to 1 HERE
60-days 78 140 35.78% 13,936 16,731 0.833 to 1 HERE
120-days 73 139 34.43% 13,708 15,614 0.878 HERE


The Results: My conclusions,

I have no idea what conclusions to draw from these results other than to say that the moving average trend filter proving to be a smoother, but usually less effective, filter than the lookback filter is consistent with other tests that I have done with these filters for the EUR/USD currency pair. Past price is usually more effective as a trend direction indicator than average past price, but moving average prices tend to avoid the extremes of good and bad results that you get with looking back at a price x number of days in the past.

However when I first saw the results produced by the breakout filters I was stunned. The breakout filter actually made the 3-day/5-day moving average crossover system worse. Nevertheless, breakout filters have proven to be very effective on other types of markets, most notably stock market indices and commodities. After these experiments I tested the system with a 12-day breakout filter which performed slightly better and did produce a positive expectancy. Other tests on the EUR/USD currency pair and other fundamentals driven markets that tend to trend well suggest that it is better to enter as soon as a breakout takes place rather than waiting for a price retracement (although this is not the case with markets that don't tend to trend so well such as commodities and stock market indices). It maybe therefore be the case that the multiple entry conditions are stopping the trading system from taking advantage of a breakout as soon as it occurs, but I'm really not sure. If any of my readers have any suggestions or comments to make about this (or anything else for that matter) I'd love to hear from them.

Thanks for reading,

David.












Forex Brokers -



Site Navigation -


Trading Systems -


On Site Articles -


Offsite Links -