Studies: Forward Shifted Moving Averages


A common use of two moving averages is to buy when a faster moving average crosses above a slower moving average, and sell when the faster average crosses below the slower average.  The illustration shows a 5-bar simple moving average plotted in dark blue crossing a 15-bar simple moving average plotted in red.

Moving average signals have advantages and disadvantages, and both are illustrated on this chart.  The advantage is that moving averages work well in trending markets (May - July).  By keeping you in a position, it heeds the counsel to 'let your profits run'.  Averages filter out minor market reactions such as those shown in the first and last weeks of June.  The disadvantage is that moving average signals 'eat you alive' in choppy markets (April and end of July) because of the lag time in the signal.

Because of these opposing characteristics of moving averages, technicians have often sought to optimize the signals by backtesting various parameter combinations for the two moving averages.  In general, faster averages reduce the lag time for the signal, but introduce additional whip-lash trades.  Slower averages filter more minor reactions, but increases the lag time which gives back more profit at major turns.

A compromise that seeks to decrease the lag time, yet still filter minor reactions, can be found in using a 2nd average that is a fast moving average forward shifted to the right instead of a slower moving average.  Tip:  This is accomplished in Ensign Windows by adding two moving average studies to a chart, and setting the Shift parameter for the 2nd average to something like 5 for a displacement 5-bars to the right.

The following chart shows two 5-bar moving averages, yet the 2nd average is shifted or displaced 5 bars to the right.  I call this a forward shifted moving average.  The two averages are identical in shape because they are both 5-bar moving averages.

Let's compare the signals on these two charts and talk about some of the differences.  The lag time on the 1st Long signal is less.  The signal is two bars earlier at a close of 5650 instead of at 5700.  The 1st Short signal occurs three bars earlier at a close of 5750 instead of at 5525.  Because of the change in lag time for these two signals the Long position taken in April changed from a losing trade (Buy 5700, Sell 5525 = 175 loss) to a winning trade (Buy 5650, Sell 5750 = 100 profit).  The better sell price (5750) also contributes to more profit in the short position taken in mid May.

However, you will notice these new averages get caught in the market reaction the first week of June for a whip-lash.  The whip-lash gave back the profit that was gained by having quicker signals with less lag time.

I made no attempt to optimize the parameters, or to find a combination that would eliminate the whip-lash.  I simply picked an example chart that had both sideways movement and a nice trend.  This trading tip illustrates the use of a forward shifted average, and discusses the advantages and disadvantages of using moving average crossovers to generate buy and sell signals.


Last modified 8/31/09 3:33 PM