Monday, November 24, 2008

Moving Average Crossovers May Not Be The Best Entry Signals

There are many ways of using moving averages to trade but by far the most common method is to trade when a short-term moving average crosses over a longer term moving average. For example, if the 10-day MA crosses above the 30-day MA we typically assume that we have a new buy signal.

Let's stop for a minute and think about what exactly is occurring at the point of a crossover. When the 10-day MA and the 30-day MA are at the same price, the trend is not nearly as clear as it should be. What we are really observing at the crossover point is that the average of the last 30 prices is exactly the same as the average of the last 10 prices. If we are looking for trends to trade, this equal relationship of the two moving averages is not a reliable or logical indication of a trend. In an upward trending market the average prices over the last 10 days should be much higher than the average of the last 30 days. By implementing new trades at crossover points we are limiting our trading to points that may not clearly reflect what we should be doing. For best results in a trend-following system we want to be trading when the trend is clear and reliable; not when the trend is confused and questionable.

Instead of trading at crossovers we should be implementing our trades when the moving averages are parallel or when the short-term moving average is moving farther away from the longer-term moving average. Perhaps the short term MA should remain a minimum of some units of Average True Range above the longer term MA for several days. I believe that this procedure would give us more reliable and more frequent entry signals in the direction of the prevailing trend, which is exactly what we want. To identify the most reliable trends we want to see the slopes of various moving averages all moving steadily in the same direction and not crossing back and forth.

Take a look at a chart of any market with a strong trend. You will see that the moving averages are not crossing back and forth repeatedly. They will be moving in the same general direction in a more or less parallel fashion. Now look at a chart of a non-trending market. As this market moves sideways the moving averages will be crossing back and forth very frequently. Look at the implications of this simple examination of the charts. If we are trading the crossovers we will be trading most frequently in non-trending markets and trading most infrequently in strongly trending markets. Is that what we want? No, it's obviously not what we want. We want just the opposite. We want frequent entry opportunities in trending markets and we want to avoid as many trades as possible in non-trending markets.

The error in the logic of trading moving average crossovers also extends to some interpretations of MACD (Moving Average Convergence and Divergence) and DMI (Directional Movement Indicator). If we are looking at MACD we want to see both lines (each line reflects a moving average relationship) moving in the same direction. We don't want to see them crossing. When looking at DMI we want to see the Plus DI lines and the Minus DI lines moving in opposite directions and definitely not crossing. Remember, when the Plus DI and the Minus DI lines intersect it is telling us that the market is in balance and has no direction; the amount of upward and downward directional movement are exactly equal. What makes our favorite indicator, the ADX, so effective is that it rises only when the Plus DI and the Minus DI are moving in opposite directions and the distance between the two indicators is widening.

With a little thought and effort I'm sure we can design some reliable entry signals that are based on moving averages but avoid the typical crossover signals. For example we could measure the slope of several moving averages and when all the averages slope upward we would have a buy signal.

We could also measure the distance between several moving averages and implement our trades when the averages are all headed in the same direction but start getting farther apart. This procedure would give us a series of entry signals within the same original trend. This should provide an excellent entry and re-entry strategy.

Friday, November 14, 2008

Contradictions in using ADX

In our last article we described how the ADX works best when a move develops out of a basing pattern. Someone sent us a very courteous email questioning this strategy and reminded us of our "25 X 25"Bond system where we want the ADX to be above 20 before looking for an entry. He commented that by the time the ADX gets to 20 any move out of a base pattern may be over. He is absolutely right and I can see how there may appear to be some confusion on how the ADX should be applied. But there really isn't any contradiction if you understand that what we are trying to do with the ADX is very different in the two examples.

In the "25 X 25"strategy the ADX is used as an important "setup"condition that tells us when the trend is strong enough that we can confidently buy on weakness. However, when we describe the basing pattern strategy we are using the ADX as the actual entry trigger to buy on strength. There is a big difference in the buy on strength and buy on weakness strategies. In the basing pattern strategy a low level of the ADX is preferred because the rise in the ADX is the trigger. If the ADX is at 12 and starts rising we very well could miss the majority of the move if we waited for it to reach 20. With the ADX already at 20 or higher it might only be safe to buy on dips and of course that is exactly what the "25 X 25"bond strategy does.

To sum things up: there is no contradiction. To catch a move out of a base you should enter as soon as the ADX starts rising. Just compare today's ADX with yesterday's ADX and the faster it is rising the better. At this point the the lower the level of the ADX the better because we are buying on strength and the ADX is our entry trigger.

System Results Update

By the way, our bond strategies have been making lots of money this year. Hope you are all trading them with real money. Back in February I had lots of critics calling and asking why we were offering long only bond systems when bonds were at 115 and that had to be the top. They said that they couldn't possibly go much higher than that and our long only results could not hold up in real trading. Now that the bonds are over 130 I am glad that we have the Serendipity system that does trade the short side because I suspect that we really are near the top. (Doesn't take a genius to make a dumb statement like that. I apologize.)

The Big Dipper system has been long since July and has huge open profits even after having to be rolled forward from the September contract into December. The "25 X 25"system is not doing bad either. When is the last time you had a free system make that much money for you? And last but not least, lets not forget the "Little Dipper". According to my recollection the last seven trades were all winners and it could be more because I can't remember the last loser. Not too bad for out of sample trading results. REMEMBER: PAST RESULTS ARE NOT NECESSARILY INDICATIVE OF FUTURE SUCCESS. I'm not just saying that because I have to. I really believe it and so should you. The bull market in bonds has made us look smarter than we really are. Bull markets do that.

Tuesday, November 4, 2008

Combining RSI and ADX

Now that I am spending seven hours a day doing trading for the new hedge fund I haven't had much time for research or writing new Bulletins. However a comment in one of the trading newsgroups that I monitor got me thinking about the potential benefits of combining our knowledge of RSI and ADX into a simple system. Both the ADX and RSI are valuable trading tools and a combination of the two would seem to offer some interesting possibilities. I like to use the RSI primarily as an indicator for buying on dips in an uptrend. The ADX is my primary indicator of trend strength.

Here are a few ideas on how the two indicators might compliment each other in a system that "knows" when to enter on strength and when to buys on dips. (I'm only going to use the long side for examples but the logic should apply to short trades as well.)

When the ADX is rising it usually indicates that a strong trend is underway. In many cases waiting for any sizeable dip would be costly because the market could run away and the dip entry would be too late to maximize our profits. In this case we must enter on strength. To make this idea into a simple trading rule we might state that if the ADX is rising (and we have some indication it is rising because an uptrend is underway) we will buy whenever the RSI is below some very high threshold like 85. This rule would give us a very prompt entry in most cases and the result would be almost identical to simply trading whenever the ADX is rising which seems to be a good idea. The RSI has little, if any, benefit in this situation except it might occasionally keep us from buying into an extremely overbought market where the RSI was above 85. In this case a slight delay on the entry might be prudent.

The RSI, however, can play a much more important role when the ADX is flat or declining. In this case the rule would be that when the ADX is not rising we should postpone our entry until the RSI is below some more typical threshold like 45 or 50. Since the ADX is not giving us a signal that the trend is unusually strong we would need some additional indicator to show that the market has some minimal amount of upward direction. Otherwise we would not be buying a dip within the framework of an uptrend. Something simple like an upward sloping 20-bar moving average might work in this application.

Now that we have combined the ADX and RSI for our entries we might also want to combine them for our exits. When a market is rising but the trend is not particularly strong any spike in the RSI represents a good opportunity to take a profit. For example when trading in stocks the 9-bar RSI rising above 75 or 80 often signals that a correction is imminent. If the market trend is not unusually strong we would probably be happy with taking our profit on strength rather than waiting to get stopped out on weakness. However if the ADX is rising we might want to risk a correction in hopes of riding the trend even further. In this case when the ADX was rising we would ignore the RSI signal to take our profit. However, once our patience has allowed us to accumulate a very substantial open profit we might be best served by acting on the next RSI signal and nailing down the big winner. Also, when the ADX is rising it would not make much sense to be buying at a high RSI level and also selling at a high RSI level. We would be in and out of our trades almost immediately. Therefore we need to ignore the RSI extremes until our profit has had a chance to accumulate.

In summary, the important concept to remember is that our knowledge of the ADX can make the RSI a much more useful trading tool. When the ADX is rising the RSI tends to get overbought and it can often remain overbought for a surprising length of time. On the other hand when the ADX is flat or declining any spike to the upside in the RSI is an opportunity to nail down a profit. Conversely, any spike to the downside can be a potentially profitable entry point.

Here is the logic of a simple little system based on this discussion. (Just the rules in text form, you will have to do your own coding.) The parameters selected have not been tested or optimized. For example the 20-day moving average is just a number I picked out of the air. This is enough information to get you started and you can vary the rules to make the system trade over whatever time frame you prefer.

Long Entries:

1. The 20-bar moving average must be rising.
2. If the ADX is rising (ADX today is 0.20 or more higher than yesterday) then buy if the 14 bar RSI is less than 85.
3. If the ADX is not rising (ADX today is not 0.20 higher than yesterday) then buy if the 14 bar RSI is less than 50. Here is where you can influence the frequency of trading. For more trades use a higher threshold like 60. For fewer trades use a lower threshold like 40.

Long Exits

1. If the ADX is not rising (ADX today is not 0.20 higher than yesterday) then sell (long exit) if the 9-bar RSI is greater than 75.
2. If the ADX is rising (ADX today is 0.20 or more higher than yesterday) and the open profit is greater than (pick some amount - maybe 4 ATRs or some unit of price) then sell if the 9-bar RSI is greater than 75.
3. You need some additional exit rule for the losing trades. Use your favorite loss-limiting exit or you might want to exit when the price goes below the 20-dat moving average or when the 20-day moving average turns down. (See entry rule 1.)