Forex: A Trend-Antitrend Trading System

In this section we explore the trend-antitrend (T-AT) system, designed to switch automatically between an antitrend mode and a trend-following mode. You will like this system if you aggressively like to fade the market, but do not mind reversing into a with-the-trend position if needed. This system shows you that trend following is not the only way to trade the markets. Many institutions and money managers, with their deep pockets, big positions, excellent execution, and low costs, usually assume the market is ranging. These sophisticated souls will be selling new highs and buying new lows. Of course, the difference is in the trading time frames: They are in and out a dozen times, before most of us are warming up to the trade.

The challenge in this type of system is to find a consistent basis to define when to trade with the trend and when to fade it. Markets will often make new 25-day highs or lows, but without strong momentum. This can be interpreted to mean that the market is likely to reverse, so we should try to sell the highs and buy the lows. However, if the market then goes on to make news highs or lows with increasing momentum, we must immediately reverse into a trend-following position.

For this system, we will use the 18-day ADX to measure market trendiness, and an 18-day SMA of the ADX as the reference. If the ADX is above its own 18-day SMA, then the market is trending, and we will buy new highs, and sell new lows. Conversely, if the ADX is below its 18-day SMA, we will sell new highs, and buy new lows. Since we will be going against the short-term trend, we must use an initial risk control stop, or the losses will be unbearable.

We must also decide how to enter the trade. For simplicity, we will enter on the open of the next trading day. We can use the usual 20-day exit to check on the trend-following aspects. Again, for simplicity, we will test this system without specific exits, so that the entries also serve as the exit for the opposite position.

Figure 4.27 The trend-antitrend system in action on the September 1993 U.S. bond contract. Notice how it picked off turning points nicely during the consolidation. It detected two turning points during the uptrend, but quickly reversed to follow the up move.

You can see how this trading system works in Figure 4.27 from the September 1993 U.S. bond contract. The market formed a base during a congestion phase, and then rallied strongly, experiencing one brief sideways period. Observe how the model readily fades new highs, and then quickly reverses in the direction of die trend. This system picked off the top and bottom cleanly during the consolidation in April and May. It was long coming into the rally off the May bottom. It hiccuped twice, in June and August, but quickly returned to the underlying long trend.

As Figure 4.27 shows, the T-AT system caught some turning points very well. This system will also see turning points that turn out to be insignificant, and, of course, there will be some turning points that it will not notice at all. The drawback of the T-AT system is the potential for significant loss as it switches fruitlessly between its anti-trend and trend-following modes.

The usual T-AT system worked beautifully on the December 1985 deutsche mark contract (see Figure 4.28). The DM was defining a broad consolidation region after a down trend. Note how the T-AT system quickly reversed to long in September after a premature short signal. The subsequent market turns were timed flawlessly. This is quite remarkable for a mechanical system using a single trend-checking rule.

Figure 4.28 The T-AT system picked off turning points flawlessly in this December 1985 deutsche mark contract. Notice how it quickly returned to a trend-following mode in September, as the market drifted lower.

You must use good risk control with this system, since the market could move against the position in a vicious countermove. The June 1995 deutsche mark contract provides a good illustration of this (see Figure 4.29). The T-AT system signaled a perfect short trade within a day of the actual contract high. Then, it correctly picked off the bottom of the quick sell off. However, it rolled over to short during the brief congestion and then was short through the volatile countermove in late May. Trend-antitrend trading requires great faith in the system and rigid risk control, with the added benefit that the risk/reward ratio can be excellent.

iculty of using a heavily smoothed ADX indicator in volatile markets. The same smoothing that desensitizes ADX works against it if the market is choppy and thin.
Another quirk of the T-AT system is that it will often be slow in signaling a countermove if the market is drifting slowly, as the December 1993 cotton contract was doing near the summer top. T-AT logic correctly picked the first low (see Figure 4.30), but had to sit through the ensuing double bottom in November before the trend turned up. Once again, we have the hiccup at the start of the trend, with the system quickly reversing into the intermediate trend.

Let us briefly explore how this system was actually written, using the Power Editor from Omega Research’s TradeStation™ software.

Figure 4.29 The June 1995 deutsche mark contract illustrates how the T-AT system can get trapped by a volatile countermove.
Figure 4.30 The T-AT system was slow to respond to the market drift in the summer for the December 1993 cotton contract. It correctly picked the first dip of the eventual double bottom.

There is only one input variable, the length of the breakout period, cur-rently set to 25 bars (days). The antitrend entry at a new 25-day high is written as follows: if today’s high was the highest high of the previous 25 days, but the 18-day ADX was below its 18-day SMA, then sell to-morrow at the market on the open. The countertrend buy signal is also similar.

If high > highest (H.25)[1] and ADX(18) < average
(adx(18).18) then sell tomorrow on the open.
If low < lowest (L,25)[1] and ADX(18) < average
(adx(18).18) then buy tomorrow on the open.

This approach gives a symmetric long and short sell order on an antitrend basis. Let us assume you have a long position near a potential bottom. However, the market bounces up for a few days, and then re-verses to begin a strong downtrend. In this situation, you want the sys-tem to switch to a short trend-following position only if it is long to be-gin with. Similarly, a new 25-day high with rising momentum is your signal to switch to a long position if you were short to begin with. Thus, the trend-following entries are similar to the antitrend entries, but you should first test if the system is short or long.

If MARKETPOSITION(O) – 1 and low < 1owest(L,25)[1] and
ADX(18) > average(ADX(18),18) then sell tomorrow on the open.
If MARKETPOSITION(O) – -1 and high > h1ghest(H.25)[l]
and ADX(18) > average(ADX(18),18) then buy tomorrow on the open.

Here MARKETPOSITION is a special built-in function that re-turns 1 if the system is long, and -1 if the system is short. Once again, we have the symmetric conditions for long reentry. If we sell a new 25-day high, but the market makes new 25-day highs with increasing momentum, then the T-AT system switches to long. A similar condition holds for the short reentry.
By design, the T-AT system first tries the antitrend entry, and with-the-trend positions occur on reentry. Therefore, you should remember that this system will lose money as it hunts for a reentry market condition. Of course, if the resulting trend is a long one, then the loss at reentry will seem minor.

If you like this approach, you can try a number of variations. You could enter not on the open, but on the close or beyond the previous day’s high or low. You could also use a more sensitive reentry, as just a new 25-day high or low, not requiring the additional ADX conditions.

Table 4.14 shows the results of long-term testing on all available data from January 1, 1975 through July 10, 1995 with a $5,000 stop and allowing $100 for slippage and commissions. Only markets with positive results are included, since this strategy requires active markets.

Table 4.14 points out the strengths and weaknesses of the T-AT system. First, it does not work on all markets, and second, it generates a lot of trades. Hence, this is an expensive system to run, as shown by the drawdown numbers. The initial stop had to be rather wide, at $5,000, to allow a cushion for the antitrend component to work. However, the profit factor is healthy, as is the average trade. Hence, on mature and active markets, the T-AT system seems to work quite well. The strategy requires excellent risk control and good discipline to implement. You can now develop other variations of this system, adapting it to your trading preferences.

Table 4.14 Long-term performance of T-AT system over all available data from January 1, 1975 through July 10, 1995 with $5,000 stop and $100 for slippage and commissions.
best forex
Figure 4.31 Frequency distribution of T-AT trades showing a spike at the $5,000 initial stop and at trades with profit greater than $8,000.

Figure 4.31 presents a frequency distribution of 1,311 trades generated by the T-AT system. This distribution is broader than the distribution for the 65sma-3cc system (see Figure 4.5). It also shows a spike near the $5,000 initial stop. Like the 65sma-3cc distribution, it also shows a spike for trades with big profits. Figure 4.32 shows this distribution normalized and compared to a fitted normal distribution. It is immediately clear that the T-AT trade distribution has “fat” tails compared to the normal distribution. Thus, the probability of a trade far from the center is much greater than the corresponding normal distribution. The tail on the profits side is fatter than on the losing side, suggesting that the entries are working well. Observe how the initial stop cuts off losing trades. However, there is no such cutoff on the profit side, as seen by the spike at the right edge of the distribution. This is the TOPS COLA principle introduced in chapter 1 applied to a trading system in practice.

forex signal
Figure 4.32 T-AT frequency distribution normalized and compared to a fitted normal distribution.

In summary, the T-AT system illustrates how to develop a system that automatically adjusts to market conditions. It differs from the 65sma-3cc system in that its initial stance is to take an antitrend position; the 65sma-3cc system always takes a position with the trend. A reversal condition switches the T-AT system from antitrend to a trendfollowing mode. The objective reversal condition assures entry in the direction of a major trend, thus allowing you to take advantage of all market conditions.



News Feed