By Andreas Thalassinos, BSc, MSc, MSTA, CFTe, MFTA

Abstract

The paper is based on the fundamental premise of Technical Analysis that prices move in trends. The basic structures (Gann Swing charts, HIP & LOP, Peaks and Troughs) that comprise trends will be revisited with proposed variations with an attempt through algorithmic tests to diagnose the healthy (promising) vs. weak setups. The tests will mostly focus on the definitions of peaks and troughs(i.e. higher high and higher low, higher close and higher low, etc), the length of the swing leg and the swing's position in the life of the trend. The paper will not be limited to swings only but the study will be extended to cover the basic structures of a trend reversal, that is, failure and non-failure swings.

 

Introduction

In my early trading steps, I stumbled on a few books on technical analysis. Some of them more in-depth than others while some referred to experienced traders and the rest to novice traders. I was amazed then, to discover that all books gyrated around trend! Some of them even mentioned the principles or tenets of technical analysis that of course refer to trend. One of the three tenets states that prices move in trends and more specifically in another tenet that prices do not move in a straight line but on the contrary they follow a zigzag path. We all read or heard repeatedly throughout our technical analysis education, the phrases "trend is your friend", "follow the trend" and "never go against the trend". Many years have gone by since my first trading steps and now, as a certified technical analyst, I can assure you that, this is one of the best advices that one can get in his/her early trading career. Do not let the simplicity behind it to obscure its value or importance. After all, it's a general advice that applies to all markets and all financial instruments. As simple as it sounds though, the advice I have to admit, is much more complicated or sophisticated if I may use this word or even better, it barely reveals the tip of the iceberg. Try to adopt it while trading a specific market or a specific financial instrument and a lot of questions will arise. It engulfs many questions that need to be answered before adopting it to trade the markets. What is trend? A simple question with supposedly a simple answer. How can we spot the early beginning of the trend and the end of it? How far will this trend travel? This is the question. What are the building blocks of a trend and how do they affect its future life? Welles Wilder Mentioned the HIPs and LOPs as building blocks, Bill Williams mentioned the fractals as a recursive entity that makes up the trend and of course John Murphy mentions in his book Technical Analysis for the Financial Markets the failure and non-failure swings. In the quest of developing a profitable automated trading system I discovered through extensive reading that a minimum of 1:1 risk reward is needed for a system to avoid negative balance. Of course, money management is out of the scope of this paper but I am extremely obliged to urge all new traders to devote the relevant time to study the subject.

In the rest of this paper I will try to prove through algorithmic tests that the length of the swing, its position in the life of the trend and the structure of peaks and troughs are directly related with the strength of the unfolding trend that is, how far the trend will travel.

 

Trend Building Blocks

Many theories have been developed regarding trend. The most popular technical tool used is of course the renowned moving average. If prices are above the moving average then the market is in an uptrend and consequently if prices are below the moving average then the market is in a downtrend. Most naturally more questions follow. What is the best moving average period ? What is the best moving average method? Which prices to average? After investigating moving averages a bit further, a trader soon discovers that regardless of the type and price averaging, they are all lagging. Moreover, they are a sure prescription for negative balance during a sideways trendless range.

Going back to the 19th century, the father of technical analysis, Charles Dow, observed that it is the direction of peaks and troughs that defines the trend of the market. Thus, when the market experiences two peaks and troughs successively higher than each other then, the market is said to be in an uptrend (Fig.1). figure1
Of course, the opposite is true as well. When the market shows two peaks and troughs successively lower than each other then, the market is said to be in a downtrend (Fig. 2).

figure2

Unfortunately, trend does not move in only two directions. When markets depict equal peaks and equal troughs then the market is trendless or in a range or moving sideways (Fig. 3).

figure3

So far so good. But allow me to ask another simple question. What are peaks and troughs? Well, since the direction of trend depends on the direction of successive peaks and troughs then it is imperative that we define the building blocks of trend. Welles Wilder mentions in his book New Concepts in Technical Trading Systems, HIPs and LOPs, that is, high points and low points (Fig. 4).

figure4

 "LOP is an abbreviation used for LOW POINT. A LOP is any time bar which has a time bar immediately before it, and immediately after it with a higher low. A HIP signifies a HIGH POINT and is defined as any time bar immediately before it, and immediately, after it with a lower high." (1)

figure5In his book, Chaos Theory: Applying Expert Techniques to Maximize your Profits, Bill Williams states that "market or behavioural fractals indicate a significant behaviour change."(2) He goes on to say that fractals constitute the underlying structure of the Elliott wave. Fractals come in two flavours. Up fractals and down fractals. Up fractal is a series of at least five consecutive bars where the highest bar is preceded by two lower highs and followed by two lower highs as well. Lows are not important for this pattern. Up fractals form peaks throughout the life of a trend. On the other hand, a down fractal is a series of at least five consecutive bars where the lowest bar is preceded by two higher lows and followed by two higher lows. Highs are not important for this pattern. Down fractals form troughs throughout the life of a trend (Fig. 5).

Now, most naturally more questions arise. Which price is best to use? Closed or live? Charles Dow preferred the closed price and more specifically he considered the daily close the most significant price. Well, in today's markets, most traders follow lower than daily time frames and do not have the patience for a bar/candlestick to complete.

figure6Last but not least, is W.D. Gann, one of the best traders of all times. He formulated the swing charts. According to Clif Droke in the book Gann Simplified, "he had various ways of constructing a swing chart, which is basically a chart in which extreme tops and bottoms of each time increment (whether a day, week, month, or year, depending upon the type of chart used) is connected with a line for every two or three period move in a single direction." (3) In other words, a Gann swing chart can be constructed by following the highs and lows of the bars. For example, a 2-bar swing chart will define a bottom after the market has made two consecutive higher-highs. On the other hand, a 2-bar swing chart will define a top after the market has made two consecutive lower-lows (Fig. 6).

Swing charts may be developed by using 3-bar even 1-bar swing charts. Also, higher-close and lower-close bars may be used as Gann himself mentions in his rule of five.

Trend may be defined as either of the above building blocks. Now, the question has to do with the swing leg. What is the minimum swing-leg length to adopt? Does the length of the swing has to do with how far the underlying trend will travel? In Elliott Wave Principle, Frost and Prechter state that “It is our practice to try to determine in advance where the next move will likely take the market.” (4)

 

Peaks and Troughs - Gann Charts

Throughout the rest of the paper and algorithmic tests the following definitions, parameters and assumptions are adopted: Peaks and troughs are defined by employing Gann’s 2-bar swing charts. The first variation is based on higher high/higher low for peaks and lower high/lower low for troughs utilizing live closing prices (Fig. 7).

figure7

The second variation is based on higher close/higher low for peaks and lower high/lower close for troughs but this time utilizing closing prices after the bar/candlestick had closed (Fig. 8) figure8
Another parameter is the swing's length, that is, the distance between peak and trough (Fig. 9) figure9

 

Swing's Position in the Life of the Trend

The third parameter used is the position of the swing in the life of the trend. There are two cases under study. The first swing in the opposite direction, that is, the reversal of a prior trend and the second case is all swings after the reversal. A distinction is made between failure swing and non-failure swing reversals, that is, the first swing in the opposite direction.

A failure swing occurs after a trend has been in effect, exhibiting successively higher peaks and higher troughs during an uptrend( lower peaks and lower troughs in a downtrend) until prices fail to make a higher peak and instead swing direction falling below the last trough. Peak Y fails to move higher than previous Peak X and instead, prices swing direction and fall below Trough Z (Fig. 10). figure10
During a downtrend the opposite is true. A series of successively lower peaks and lower troughs is interrupted by the failure of prices to make a new lower trough and instead they swing direction upwards breaking the last peak. Trough Y fails to move lower than Trough X and instead prices swing direction and break Peak Z (Fig. 11). figure11
A non-failure swing occurs after a trend has been in effect, exhibiting successively higher peaks and higher troughs during an uptrend( lower peaks and lower troughs in a downtrend) until prices do make a higher peak but swing direction falling below the last trough. Peak Y moves higher than previous Peak X and prices swing direction and fall below Trough Z (Fig. 12). figure12
In the course of a downtrend the opposite is true. A series of successively lower peaks and lower troughs is interrupted by the prices making a new lower trough and swing direction upwards breaking the last peak. Trough Y moves lower than Trough X and prices swing direction and break Peak Z (Fig. 13) figure13

 

Algorithmic Tests

Due to the vast popularity that foreign exchange enjoys nowadays among traders, I decided to use the most liquid and popular currency pair, EURUSD, to run all tests.
Also, I decided to set a realistic fixed spread of 2 pips for all tests.
Apart from the above definitions and parameters, I used the 30-minute timeframe as I strongly believe that the majority of today's traders utilize timeframes below the daily. All tests were run on EURUSD for the period of 1/9/2011 – 8/9/2013.

The first algorithmic test is based on the following parameters:

  • Peaks are defined as Higher High/Higher Low (HH/HL) using live closing prices.
  • Troughs are defined as Lower High/Lower Low (LH/LL) using live closing prices.
  • Swing lengths of 8.5, 16, 20 and 25 pips are used.
  • Price targets of 130%, 160%, 200%, 250%, 300% and 350% of the swing length are examined.
  • Only failure swings are used, ignoring the rest of the swings.
  • EURUSD is the financial instrument used.
  • Periodicity of 30 minutes is employed.
  • Spread is set to 2 pips.
  • The algorithmic test will test the period of 01/09/2011 until 29/09/2013.

As you can see below (Table 1) the results are clearly inversely proportional. That is, the higher the price target the less the probability to achieve it. Also, as expected, the 130% level exhibits the highest probability, about 60% - 75%, to be reached regardless of the swing length. Furthermore, the 160% level enjoys about 50% probability to be achieved. Surprisingly, the rest of the target levels fall below the 50% success rate. Another important finding has to do with risk-to-reward ratio. The probability of reaching 1:1, 200% target level, is in the range of 30%- 40%. Also, the probability of reaching 2:1, 300% target level, is in the range of 13% - 20%. In addition to the above, the swing length of 8.5 pips shows the best performance compared to the rest of the swing lengths. The length of the swing is inversely proportional to the percentage of the trades that reached the target of the important levels of 200% and 300%.

test1

The second algorithmic test is based on the following parameters:

  • Peaks are defined as Higher High/Higher Low (HH/HL) using live closing prices.
  • Troughs are defined as Lower High/Lower Low (LH/LL) using live closing prices.
  • Swing lengths of 8.5, 16, 20 and 25 pips are used.
  • Price targets of 130%, 160%, 200%, 250%, 300% and 350% of the swing length are examined.
  • Only non-failure swings are used.
  • EURUSD is the financial instrument used.
  • Periodicity of 30 minutes is employed.
  • Spread is set to 2 pips.
  • The algorithmic test will test the period of 01/09/2011 until 29/09/2013.

The second test is based on non-failure swings with the rest of the parameters remaining the same. Looking at (Table 2) we observe that the results are again inversely proportional as expected. Once more, the 130% level exhibits the highest probability to be reached but this time is even improved with a success rate close to 76% regardless of the swing length. Furthermore, the 160% level shows a 50% probability to be reached. On the other hand, price targets of 300% and 350% have lower probabilities to be achieved compared to the first test of failure swings. The probability of reaching 1:1, 200% target level, is in the range of 37%- 40%. The probability of reaching 2:1, 300% target level, is in the range of 10% - 16%. The length of the swing is inversely proportional to the percentage of the trades that reached the target of the important levels of 200% and 300%.

test2

The third algorithmic test is based on the following parameters:

  • Peaks are defined as Higher High/Higher Low (HH/HL) using live closing prices.
  • Troughs are defined as Lower High/Lower Low (LH/LL) using live closing prices.
  • Swing lengths of 8.5, 16, 20 and 25 pips are used.
  • Price targets of 130%, 160%, 200%, 250%, 300% and 350% of the swing length are examined.
  • All swings are considered except reversals.
  • EURUSD is the financial instrument used.
  • Periodicity of 30 minutes is employed.
  • Spread is set to 2 pips.
  • The algorithmic test will test the period of 01/09/2011 until 29/09/2013.

The third test excludes failure and non-failure swings and only takes into account swings in the direction of the trend. The rest of the parameters remain the same. As you observe (Table 3) reveals that the results are again inversely proportional. The 130% level exhibits the highest probability to be reached with a success rate in the range of 73% - 76% regardless of the swing length. Additionally, the 160% level shows a further improvement of the probabilities to be achieved, reaching 60%. The probability of reaching 1:1 reward-to-risk ratio that is, 200% target level, is in the range of 36%- 45%. Also, the probability of reaching 2:1, 300% target level, is in the range of 19% - 24%. Once more, the swing length of 8.5 pips shows the best performance compared to the rest of the swing lengths on the important levels of 200% and 300%. The inverse proportionality between the length of the swing and the percentage of the trades that achieved the targets of 200% and 300% has been confirmed.

test3

Summing up the first three tests we realize that the price target of 130% of the swing length has about 70% probability of reaching it regardless of the length of the swing. More importantly, 1:1 reward-to-risk ratio has a probability of less than 50%. The next important higher price target of 300% that is, 2:1 reward-to-risk ratio, has a probability of less than 35%. Of course, the swing length and the percentage of the trades that achieved the target of 200% and 300% are inversely proportional. Overall, the third test revealed that all swings in the direction of the unfolding trend, excluding reversals, have a higher probability of reaching the important price targets of 200% and 300%.

The fourth algorithmic test is based on the following parameters:

  • Peaks are defined as Higher Close/Higher Low (HC/HL) using closed closing prices.
  • Troughs are defined as Lower Close/Lower Low (LC/LL) using closed closing prices.
  • Swing lengths of 8.5, 16, 20 and 25 pips are used.
  • Price targets of 130%, 160%, 200%, 250%, 300% and 350% of the swing length are examined.
  • Only failure swings are used..
  • EURUSD is the financial instrument used.
  • Periodicity of 30 minutes is employed.
  • Spread is set to 2 pips.
  • The algorithmic test will test the period of 01/09/2011 until 29/09/2013.

This time, as will you will notice at the table below (Table 4) the results follow the same patterns. The higher the price target the less the probability to achieve it. More specifically, the 130% holds the highest probability, about 63% - 73%, to be reached regardless of the swing length. Furthermore, the 160% level shows probabilities to be achieved, close to 50%. The rest of the target levels have less than 50% probability to succeed. The probability of reaching 1:1, 200% target level, is in the range of 47%- 55%. Also, the probability of reaching 2:1, 300% target level, is in the range of 17% - 26%. For the fourth time the inverse proportionality remains intact.

test4

The fifth algorithmic test is based on the following parameters:

  • Peaks are defined as Higher Close/Higher Low (HC/HL) using closed closing prices.
  • Troughs are defined as Lower Close/Lower Low (LC/LL) using closed closing prices.
  • Swing lengths of 8.5, 16, 20 and 25 pips are used.
  • Price targets of 130%, 160%, 200%, 250%, 300% and 350% of the swing length are examined.
  • Only non-failure swing are used.
  • EURUSD is the financial instrument used.
  • Periodicity of 30 minutes is employed.
  • Spread is set to 2 pips.
  • The algorithmic test will test the period of 01/09/2011 until 29/09/2013.

The fifth test, as seen at table (Table 5) confirms the on-going pattern of the 130% price target. It holds a probability of about 73 regardless of the swing length. Furthermore, the 160% level shows probabilities to be achieved, close to 56%. The rest of the target levels have less than 50% probability to succeed. The probability of reaching 1:1, 200% target level, is in the range of 36%- 39%. Also, the probability of reaching 2:1, 300% target level, is in the range of 13% - 17%. As expected, the length of the swing and the percentage of trades that reached the targets of 200% and 300% is inversely proportional.

test5

The sixth algorithmic test is based on the following parameters:

  • Peaks are defined as Higher Close/Higher Low (HC/HL) using closed closing prices.
  • Troughs are defined as Lower Close/Lower Low (LC/LL) using closed closing prices.
  • Swing lengths of 8.5, 16, 20 and 25 pips are used.
  • Price targets of 130%, 160%, 200%, 250%, 300% and 350% of the swing length are examined.
  • All  swings are considered except reversals.
  • EURUSD is the financial instrument used.
  • Periodicity of 30 minutes is employed.
  • Spread is set to 2 pips.
  • The algorithmic test will test  the period of 01/09/2011 until 29/09/2013.

The last test ,  (Table 4),   follows  the same result patterns.  The higher the price target the less the probability to achieve it. The 130% holds  the highest probability, about  73%,  to be reached regardless of the swing length. Furthermore, the 160% level shows probabilities to be achieved,  close to 56% - 59% .  The rest of the target levels have less than  40% probability to succeed. The probability of reaching 1:1, 200% target level, is in the range of 33%- 38%. Also, the probability of reaching 2:1, 300% target level, is in the range of 15% - 18%. The fact that the swing length of 16 pips has a slightly higher probability(18.02%) than the length of 8.5 pips with probability of 17.70%,  I do not believe that  is enough to cancel the pattern of inverse proportionality.

test6

Summing up the last three tests we realize that the price target of 130% of the swing length has about 63% - 75% probability of reaching it regardless of the swing length and the position. More importantly, 1:1   reward-to-risk ratio has a  probability of less than 50%. The next important price target of 300% that is 2:1 reward-to-risk  ratio has a probability of less than 30%. The swing length and the percentage of the trades that achieved the target of 200% and 300% are inversely proportional.  Furthermore, the last test revealed that reversals of failure swings, have  a higher probability of reaching the important price targets of 200% and 300% when the HC/HL and LC/LH structures are used utilizing closed closing prices.

 

Conclusion

In conclusion, I have noticed that  the size of the swing’s leg is important to the health of the unfolding trend, that is, how far the trend will travel. The smaller the length of the swing the higher the probability of the prices to reach the target.  It has been proven through algorithmic tests that I ran on MetaTrader  4 that the swing’s length is inversely proportional to the percentage of the targets reached with emphasis on the crucial levels of 200% (1:1 reward-to-risk ratio) as seen below on the (Chart 1)

200target

and 300% (2:1 reward-to-risk ratio) on( Chart 2).

300target

More specifically, the 200% target level has  less than 50% probability to be reached where the 300% level barely reaches the 27% success rate. In addition to that, the 130% target level enjoys a constant 70% success rate regardless of the length and the position of the swing.

The hypothesis, that the position of the swing in the life of the trend, is important  for the forecasting  strength of the swing it was verified through the algorithmic tests as well.  Failure swings boast higher performance  when combined with the building blocks of peaks and troughs based on higher close/higher low and lower close/lower high using closed closing prices. On the other hand, all swings after a reversal, boast  higher performance when combined with higher high/higher low structures  for troughs and lower high/lower low for peaks using live closing prices. In a nutshell, closed closing prices act as filters on the reversals  thus, decreasing the number of false swings in the opposite direction where the live closing prices perform better when the trend is already in progress.

Of course, I do not claim that the methodology that I followed is flawless.  There is always room for improvement. For example, in the  future, during a new set of tests  I will include more financial instruments in order to cover a wider spectrum of the market.   Also,  I will experiment with a variety of time spans once the hurdle of accurate data availability is overcome.

 

References

(1)    Wilder, Welles J., New Concepts in Technical Trading Systems, Hunter 1978. Pg. 7.

(2)    Williams, Bill, Trading Chaos: Applying Expert Techniques to Maximize your Profits, Wiley, 1995. Pg. 134.

(3)    Droke, Clif, Gann Simplified, Marketplace Books, 2001. Pg. 56.
(4)    Prechter, Robert R. and A. J. Frost, Elliott Wave Principle,
New Classic’s Library, 1998. Pg. 88.

 

Bibliography

Droke, Clif, Gann Simplified, Marketplace Books, 2001

Edwards Robert D. and John Magee, Technical Analysis of Stocks and Commodities,
9th Edition, Amacom, 2007

Gregory-Williams, Justine and Williams Bill, Trading Chaos,
2nd Edition, Wiley, 2004

Murphy, John J., Technical Analysis of the Financial Markets,
NYIF, 1999

Prechter, Robert R. and A. J. Frost, Elliott Wave Principle,
New Classic’s Library, 1998

Pring, Martin J., Technical Analysis Explained,  4th Edition,
McGraw Hill, 2002

Wilder, Welles J., New Concepts in Technical Trading Systems,
Hunter, 1978

Williams, Bill, Trading Chaos: Applying Expert Techniques to Maximize your Profits,
Wiley, 1995

 

Software & Data

MetaTrader 4 Version 4.00 Build 509 from MetaQuotes Software Corporation,
Limassol, Cyprus.