I am often asked questions such as, ‘is it better to use trend lines or moving averages when trying to follow a trend?’ or ‘why do I get false signals when using trend lines and moving averages?’ or ‘I seem to get whipsawed a lot with moving averages, how can I fix this?’ In this article, we will examine the difference between trend lines and moving averages, where they work best and how to use them more effectively.
The charts in this article are examples I have pulled together from thousands of hours of research I conducted many years ago. To this day, I still believe in the findings and what they demonstrate.
Perhaps you are aware that both trend lines and moving averages are considered trend following indicators. Trend lines measure the rate of change in the price of a market, so they are an indication of the momentum of buyers and sellers. On the other hand, moving averages average the rate of change in the closing prices of a market so that a trend can be represented as a line.
Moving averages are considered a lagging indicator, whereas trend lines can be considered either a leading or lagging indicator. A leading indicator can signal to a trader that a trend may change before we are able to confirm that it has occurred, while a lagging indicator confirms what is already evident in the market.
As technical indicators will only ever tell you what is already evident in the market, it is important that you learn to read a chart and determine the direction of the market without using any trading tools or indicators.
Now, BHP has undergone many corporate actions since this research was conducted, so the prices quoted in this article will vary from the data you have. Also, the charts are not set to the colour standard that I use for a more holistic analysis on a stock or market. In these charts, the bars are colour coded using the closing price, however, for this demonstration the colour coding of the bars is not important. That said, it is critical when you are learning to apply analysis to your charts.
Let’s get into the research findings….
I used a weekly chart of BHP as one example and positioned trend lines and moving averages to determine the most appropriate buy and sell signals to trade. I applied valid trend lines and overlaid a standard 21 period moving average.
There are many different filters you can apply when using moving averages and trend lines. Common filters include:
Entire Bar: An entire bar must trade on the other side of the moving average or trend
Close: Price must close across the moving average or trend line.
Price Units: Price must cross the moving average or trend line by a certain number of price units.
Time: Price must cross the moving average or trend line for a certain period of time.
Percentage: Price must cross the moving average or trend line by a certain percentage of the price.
There are also combinations of these filters; for example, price must close across the moving average or trend line for two bars.
For this example, we will use the same filters for buying and selling throughout, i.e. when we have two closes above a downtrend line or moving average on a weekly chart we buy; and when we have two closes below an uptrend line or moving average on a weekly chart we sell.
Given that we are working on a weekly chart, we will assume that the buy and sell transactions occur on the opening price on the Monday morning following the buy or sell signal, however, for ease of extracting the date from the chart I refer to the week ending date rather than the actual date of entry.
In Figure 1, our first buy signal for both the moving average and the trend line (Buy 1) occurred on the open at $6.92 week ending 26/3/99. At the time the stock was in a confirmed uptrend and it had been 12 weeks since the low in Dec 98 with the stock making higher peaks and troughs.
The trend line provided the first sell signal on the open at $8.36 week ending 3/9/99 (Sell 1), which at the time was a leading indication of the trend failing because the stock had not confirmed a downtrend. We had seen a lower peak but not a lower trough; indeed confirmation of the downtrend came 8 weeks after we had sold. The moving average sell signal was below the trend line exit and 9 weeks later on the open at $7.93 week ending 5/11/99 (Sell 2), therefore, Round 1 goes to trend lines for providing the most profit.
So why did the moving average give us a late signal?
Remember, we use closing prices to calculate the moving average and herein lies the problem. At the start of an uptrend, the market behaves differently to the end of a trend because the psychology of the market is different. This is supported by the fact that it is often the ‘inexperienced’ that set the opening price of a period, while the professionals set the closing price.
In this example, the psychology of the buyers and sellers was not reflected in the moving average at the top of the trend, so the indicator provided a late signal in which to exit the market. Consequently, you will often see traders use other trend confirming indicators like the MACD, which is a momentum indicator, in conjunction with moving averages, in an attempt to compensate for this or recognise an early change in the momentum of a stock.
Once again, in Buy 2, both the trend line and moving average provided a buy signal on the open at $9.67 week ending 31/12/99, and at the time the stock was in a confirmed uptrend. However, the stock quickly fell away soon after buying. Normally, we would have used a stop loss to exit but for the sake of this example, let’s stick to a simple trend line.
The first sell signal came from the moving average on the open at $7.97 week ending 25/2/00 (Sell 3); the very next week the trend line gave us a signal which was higher on the open at $8.16 week ending 3/3/00 (Sell 4). Despite the fact that the trend line sell signal was slightly later in time, Round 2 also goes to trend lines as we achieved a better price when selling the stock. Both tools picked up the sell signal prior to a lower peak and lower trough becoming evident.
The next buy signal (Buy 3) demonstrates the main difference between trend lines and moving averages. Using the moving average, we entered the trade on the open at $9.30 week ending 30/6/00; from there the stock gave us a mixture of higher and lower peaks and troughs, which is an indication of a sideways trending market. Drawing a valid trend line, however, will generally keep you out of this type of market as it rarely provides a buy signal. Remember, these tools will only ever confirm what is already evident in the market.
Our exit point for the trade using the moving average was $9.06 week ending 3/11/00 (Sell 5) where we incurred a loss of around 2.6% in just over 4 months. Consequently, Round 3 also goes to trend lines, as this tool kept us from trading and therefore protected our capital.
Our next buy signal (Buy 4) occurred on the open at $9.70 week ending 2/3/01, which again was a point where both the moving average and trend line confirmed a buy signal as shown in Figure 2. At the time the stock was not in an uptrend as we were absent of a higher trough, however, the stock did trade above the previous peak.
The trend line provided the first sell signal on the open at $10.40 week ending 6/7/01 (Sell 6), which was 6 weeks after the peak of $11.40 but before the stock confirmed a lower peak and lower trough; therefore, once again, the trend line was a leading indicator.
Four weeks later, the moving average provided a sell signal on the open at $9.55 week ending 3/8/01 (Sell 7). Using trend lines, we exited the trade in profit, although not by much, while the moving average had us exit the trade at a loss; therefore, Round 4 also goes to trend lines.
We got another dual buy signal from the trend line and moving average (Buy 5) on the open at $9.65 week ending 30/11/01. Our first sell signal came via the trend line on the open at $11.37 week ending 29/3/02 (Sell 8), which was two weeks after a lower peak and trough confirmed a downtrend as occurs in Dow Theory. Three weeks later, the moving average confirmed a sell signal on the open at $10.74 week ending 10/5/02 (Sell 9), which was a profitable trade, although, it was below the sell signal from the trend line; therefore, Round 5 again goes to trend lines.
So, let’s analyse the results: Table 1 outlines the trades for trend lines while Table 2 outlines the trades for the moving average.
Table 1: Trend line
Table 2: Moving Average
We bought four times using a trend line with a win/loss ratio of 3 wins and 1 loss or a 75% success rate. We bought five times using a moving average with a win/loss ratio of 2 wins and 3 losses or a 40% success rate. The average win for the trend line was 15.3%, while the moving average was 12.9%. There was one loss for the trend line at 15.6%, while the average loss for the moving average was 7.2%. Overall, we achieved a profit of $2.35 when using trend lines and a loss of $0.01 when applying a moving average. Remember, this is based on just one share for each trade and therefore the difference increases dramatically when you consider your actual position size.
Many traders make the fatal flaw of using what seems easy. After all, software can calculate a moving average and apply it to a chart for you, but this is not the case with a trend line. You need to properly learn how to apply them and then you need to be shown how to test it properly.
Even the most educated (in other fields) people that I have had the pleasure of training thought they knew how to apply trend lines. However, when shown later they realised the gaping hole between what they thought was right and what is actually correct. There is an art to this and it takes practice even once you have been taught how to do it. Nevertheless, once you hold the knowledge, you have the ability to add zeros to your returns.
As far as entering the stock, both tools got us into a trend reasonably early and at low risk. Trend lines, however, allowed us to exit a stock in a much better position. As we discovered, trend lines also tend to keep you from entering a stock in a sideways trending market.
So how could we improve on this result?
If you want to make trading your business you need to learn the importance of testing different rules to find the right ones for a particular stock because one rule does not work best for all stocks or markets. Most educators will not teach you this concept properly. Instead they’ll have you looking at multiple moving averages, or other indicators. I will share my thoughts on this in a future article.
BHP was selected for the research to test the rules as it had doubled in price over the prior three years and is a very volatile stock with many up and down trends. It would have been very easy to pick a stock that just trends in one direction for long periods; however, anyone can trade a strong bull market and make money simply because any tool will work in a strong bull market. It is not until we get into a volatile market that we begin to see what methods are most effective.
Dale Gillham is Chief Analyst and Head Trainer at Wealth Within.
He is also a bestselling author, keynote speaker, and one of Australia’s leading investment experts. He is sought after for his expert opinion for comments or editorials in major Australian newspapers, magazines, and financial publications. For two decades Dale has educated and entertained investors and traders in every state of Australia, New Zealand, Malaysia, and China.