Science Behind Harmonic Pattern in Forex and Stock Market

In this article, we will explain Harmonic Patterns, like Gartley, Bat, Butterfly, Crab, and so,  in terms of scientific point of view. Harmonic patterns are an analytical approach among traders in Forex and Stock. Harmonic Patterns are based on the idea that price movements in financial markets follow fractal patterns that repeat over time. In fact, Fractal patterns are the scientific basis for Harmonic Patterns. The important fractal pattern behind the Harmonic Patterns are Fractal Wave since we are talking about fractal patterns in time. These fractal wave or fractal pattern are formed by a combination of swing high and swing low, which are also recognized as the endless zig zag patterns or endless triangles in any stock and forex chart without exception. These fractal wave patterns can be examined using the ratio approach which are less prone to varying scale in Fractal pattern.  These ratio are also known as retracement, extentions and expansions. Sometimes, traders interpret Fractal patterns using Fibonacci retracements and extensions, which are ratios derived from the Fibonacci sequence. Harmonic patterns are one of the chart patterns that are made up from Fibonacci ratio analysis.

The similarity between harmonic patterns and basic chart patterns is that, for each of them, the shape and structure are key factors to recognizing and validating a specific patterns. However, a key difference is that harmonic patterns are defined more precisely using ratios. For example, Harmonic Patterns are 5-point pattern structures, containing combinations of well defined consecutive Fibonacci retracements and Fibonacci extensions, leaving less room for flexible interpretation. Harmonic patterns continuously repeat themselves, especially in consolidating markets. There are basically 2 types of patterns: 5-point retracement structures like the Gartley and the Bat and 5-point extension patterns like the Butterfly and the Crab. In this article, we express the Harmonic Pattern structure with ratio analysis using the following letters.

  • R0: Retracement of first triangle or zigzag
  • R1: Retracement of second triangle or zigzag
  • R2: Retracement of third triangle or zigzag
  • C0: retracement of bigger triangle or zigzag


1 Introduction to Harmonic Pattern

Harmonic patterns are another fractal wave patterns that frequently used by many financial traders. Harmonic patterns are typically made up from two or three triangles (i.e. three price swings or four price swings). The structures of the harmonic pattern are based on the Fibonacci ratios. Hence, some people consider Harmonic pattern as an advanced Fibonacci price patterns. The history of the harmonic pattern goes back to the Gartley’s book “Profits in the Stock Market” in 1935. At that time, Gartley described the trend reversal pattern on page 222 of his book. The pattern become popular in the late 1990s (Pesavento and Shapiro, 1997). Since then, many traders developed the common interest in looking for the repeating patterns in the financial markets. The harmonic patterns were refined many times in several decades. Harmonic trader emphasizes that the patterns are not only repeating in history but they also follow natural orders. Although few different references exist about the meaning of the natural orders, the natural orders mostly means the periods of the neighbouring waves in the Fibonacci relationship (Pesavento and Shapiro, 1997). Fibonacci ratio derived from Fibonacci numbers are the core relationship used in harmonic pattern identification.

2 Structure of Harmonic Patterns

Here we introduce the Harmonic Patterns that are practically useable for your trading. We list Harmonic patterns ratios found in the book by Carney in 2010. One thing we need to note is that some ratios have few alternative versions. Some alternative ratios are denoted as “or” or “;” in the Pattern structure. Butterfly Pattern has the three-triangle structure. The three triangles are enclosed by one bigger triangle with one closing retracement ratio. Pattern definition of Butterfly Pattern can be described as below:

C0: 1.270 to T0: 3,
R0: 1.618 or 2.240, R1: 0.382 or 0.886, R2: 0.786

Gartley Pattern has the three-triangle structure. The three triangles are enclosed by one bigger triangle with one closing retracement ratio. Pattern definition of Gartley Pattern can be described as below:

C0: 0.786 to T0: 3,
R0: 1.130 or 1.618, R1: 0.382 or 0.886, R2: 0.618

BAT Pattern has the three-triangle structure. The three triangles are enclosed by one bigger triangle with one closing retracement ratio. Pattern definition of BAT Pattern can be described as below:

C0: 0.886 to T0: 3,
R0: 1.618 or 2.618, R1: 0.382 or 0.886, R2: 0.382 or 0.500

Alternate BAT Pattern has the three-triangle structure. The three triangles are enclosed by one bigger triangle with one closing retracement ratio. Pattern definition of Alternate Bat Pattern can be described as below:

C0: 1.130 to T0: 3,
R0: 2.000 or 3.618, R1: 0.382 or 0.886, R2: 0.382

Shark Pattern has the three-triangle structure. The three triangles are enclosed by one bigger triangle with one closing retracement ratio. Pattern definition of Shark Pattern can be described as below:

C0: 0.886 – 1.130 to T0: 3,
R0: 1.618-2.240, R1: 1.130-1.618

Crab Pattern has the three-triangle structure. The three triangles are enclosed by one bigger triangle with one closing retracement ratio. Pattern definition of Crab Pattern can be described as below:

C0: 1.618 to T0: 3,
R0: 2.618 or 3.618, R1: 0.382 or 0.886, R2: 0.382 or 0.618

Deep Crab Pattern has the three-triangle structure. The three triangles are enclosed by one bigger triangle with one closing retracement ratio. Pattern definition of Deep Crab Pattern can be described as below:

C0: 1.618 to T0: 3,
R0: 2.000 or 3.618, R1: 0.382 or 0.886, R2: 0.886

5 to 0 Pattern has the three-triangle structure. There is no closing retracement for 5 to 0 pattern. Pattern definition of 5 to 0 Pattern can be described as below:

R0: 0.500, R1: 1.618 – 2.240, R2: 1.130-1.618

3 Detecting Harmonic Patterns

Manual Detection of Harmonic Patterns is much more challenging exercise than Fibonacci Price patterns. However, it is still doable. Especially, if you have done through-exercise with Fibonacci Price patterns, then you can manage to detect Harmonic patterns. Many people might prefer to use automated harmonic pattern scanner instead of manual pattern detection. However, as we mentioned before, it is still better if you know how to detect these patterns manually, then you can get more benefit from automated pattern scanner too. In this example, we will show you how to detect Gartley Pattern.

Gartley Pattern has the three-triangle structure. Pattern definition of Gartley Pattern can be described as below:

C0: 0.786 to T0: 3,
R0: 1.130 or 1.618, R1: 0.382 or 0.886, R2: 0.618

The structure of Gartley pattern might be more complicated than Fibonacci Price patterns. However, Harmonic Pattern is merely the extension of Fibonacci Retracement and Fibonacci Expansion. There is nothing to be scared at this point.

Once again, Peak Trough Analysis will help us saving a lot of time and effort in detecting Harmonic patterns. All you have to do is picking five points in your chart and going through Fibonacci Retracement ratio check four times. That is all. It is just tedious process doing manually. It is not necessarily impossible process to do it. You just treat R0, R1 and R2, C0 as individual Fibonacci Retracement pattern we have learnt in the previous chapter. Hence, you have to repeat the same task four times.

One thing you have to understand is that at this complication level of harmonic pattern, we will not have dead accurate pattern that matching all the ratios but we will accept the pattern if they are closely matching to the specified ratios. Typically, the ratio within 10% margin might be good enough to accept. However, sometimes, 15% margin could be the minimum ratio that we can accept as the absolute bottom. For example, for R0: 1.618, we might accept the ratio at 10% margin if it is between 1.456 and 1.780. For the case of automated pattern scanner, they will look for average of the pattern matching accuracy. Hence, it works out slightly different from manual pattern detection.

About this approximation, you might have several questions. Let me clarify them. What would happens if you want to pick the pattern that dead accurately matching these ratios in three decimal points only? The answer is simple. You will have no chance to trade because such a pattern is very rare. Although market respects Fibonacci Ratios, they will consistently produce random fluctuation around it. Chances of all four ratios are dead accurate is very small.

Another question you might ask is this: “If the ratios of pattern matches more accurately to the pattern structure, does that mean also higher success rate?”. The answer is no. Pattern matching accuracy is not related to the success rate. There is nothing we can prove statistically. As long as they are within acceptable ratio and overall shape of pattern is not horribly wrong, you can treat them as the same pattern. In fact, for success rate, it is more important to apply the better secondary confirmation techniques as well as understanding surrounding market condition. About the secondary confirmation techniques, we will use separate chapter to explain. For now, let us focus on process of detecting harmonic patterns.

In this example, we will start with R0: 1.618. Here are the steps to calculate for first Fibonacci Retracement to check R0: 1.618.

• Step 1. Applying Peak Trough Analysis in your chart
• Step 2. Pick three points of P0, P1 and P2.
• Step 3. Calculate height of right swing = Abs (P0 – P1)
• Step 4. Calculate height of left swing = Abs (P1 – P2)
• Step 5. Check the Ratio (R0) = height of right swing / height of left swing

As before, we will use Fibonacci Retracement Chart object to measure the ratio. Since 10% allowable margin of 1.618 is between 1.465 and 1.780, you can tell that the ratio is near 1.618 (161.8%).

Now we will check the second ratio for R1: 0.886 with following steps.

• Step 1. Pick three points of P1, P2 and P3.
• Step 2. Calculate height of right swing = Abs (P1 – P2)
• Step 3. Calculate height of left swing = Abs (P2 – P3)
• Step 4. Check the Ratio (R1) = height of right swing / height of left swing

As before, we will just use Fibonacci Retracement Chart object to measure the ratio. This ratio is far off in comparison to the case of R0 Since the 10% allowable margin of 0.886 is between 0.797 and 0.975. However, you can tell that the ratio is not horribly far from 0.886 (88.6%). We can leave this for later judgement for now. Hence, we will continue to check for R2: 0.618.

Now we will check third ratio for R2: 0.618 with following steps.

• Step 1. Pick three points of P2, P3 and P4.
• Step 2. Calculate height of right swing = Abs (P2 – P3)
• Step 3. Calculate height of left swing = Abs (P3 – P4)
• Step 4. Check the Ratio (R2) = height of right swing / height of left swing

As before, we will just use Fibonacci Retracement Chart object to measure the ratio. Since the 10% allowable margin is between 0.556 and 0.680, this ratio is within the acceptable range near 0.618 (61.8%). Hence, we will go for C0: 0.786.

Now we will check fourth ratio for C0: 0.786 with following steps.

• Step 1. Pick three points of P0, P3 and P4.
• Step 2. Calculate height of right swing = Abs (P0 – P3)
• Step 3. Calculate height of left swing = Abs (P3 – P4)
• Step 4. Check the Ratio (C0) = height of right swing / height of left swing

As before, we will just use Fibonacci Retracement Chart object to measure the ratio. Since the 10% allowable margin is between 0.707 and 0.865, this ratio is within the acceptable range near 0.786 (78.6%).

So far, we have checked R0, R1, R2, and C0. Among them, R0, R2 and C0 were sufficiently close to the original pattern structure of Gartley pattern. However, R1 was little far off from the 0.886 ratio. So what to do with R1? In practical trading, we will meet the situation like this often. The thing is we have consider the overall shape and pattern matching quality of other ratios. Then we will consider the secondary confirmation and surrounding market condition. In terms of overall shape of pattern, the pattern does not look horribly wrong. For example, from time to time, P1 can get too close to P3 making them level. We do not have such a bad condition in this pattern. At the same time, the other three ratios are well within acceptable range. Hence, it might be usable pattern for our trading. However, secondary confirmation and surrounding market condition are the additional factors to consider.

You might have a question on what is C0? C0 is the Fibonacci Retracement ratio like R0 and R1. We just use C0 instead of R0 or R1 when there are jagged triangles inside one big triangle. Hence, C0 is the Fibonacci Retracement ratio of big triangle. In this case, the big triangle is made up from Triangle 0, Triangle 1 and Triangle 2. For better clarification, it is important to understand that three points in your chart is equivalent to one triangle. Hence, in the price pattern made up from five points, we will have three triangles. These three triangles will make up one big triangle. If you have a difficulty to count number of triangles, then you can use simple equation like below:

Number of Triangles = Number of Points – 2

This sort of jagged pattern analysis is called Fractal pattern analysis. Indeed, Fractal pattern analysis is the core analysis behind these price patterns in this book. However, Fractal pattern analysis is more advanced topic and we will not touch them in depth in this book. RECF notation is just one convenient notation to express these Fractal Patterns in human language. Without RECF notation, it is hard to explain these complex patterns to trader. You will need many lines of drawing and many writing to describe one pattern whereas we just need two short lines with RECF notation.

As in Fibonacci Price patterns, it is rare to use Harmonic pattern alone in our trading. We still need the secondary confirmation techniques and understand the surrounding market conditions. About secondary confirmation techniques, we will discuss in the separate chapter later.

In this example, we have shown the process of detecting Gartley pattern. Detecting the other harmonic patterns are the same. For example, if you want to detect Butterfly pattern, then just treat R0, R1, R2, and C0 as four Fibonacci Retracement. Detecting Harmonic pattern is challenging because they are tedious process. Often you will find that people will go for automated scanner for that. At some point, you have to use automated pattern scanner. However, before using automated scanner, make sure that you attempt to detect them manually first. That way you can extract more benefit from the automated patterns scanner.

C0: 1.270 to T0: 3,
R0: 1.618 or 2.240, R1: 0.382 or 0.886, R2: 0.786

4 Trading with Harmonic Patterns

Harmonic patterns can be used to trade for the continuation and reversal cases depending on the major trend direction. In this example, the buy entry from Gartley Pattern is aligned with major trend direction of EURUSD. Hence, Gartley Pattern provided the buy entry in continuation. We have the similar example for Apple Inc. Stock price. In this case, we have Shark Pattern aligned with major long-term trend. As in the previous example, Shark Pattern was formed in the correction phase of the major trend. Shark Pattern picked up major turning point for buy in this continuation example. In the next example, we will be looking at the reversal example of Harmonic Patterns. EURUSD made long-term sell trend. At the end of sell trend, Gartley Pattern formation provided the sharp buy entry. This is another major turning point example. We provide reversal AB=CD pattern example in IBM Stock price. In this case, IBM suffered with sell pressure for nearly two months forming medium term sell trend. AB=CD pattern provided the current major turning point for buy opportunity.


Harmonic Pattern in Forex and Stock market is an advanced technique for your trading although it is hard to find out any scientific reference to its usage. We know that harmonic pattern is originated from Fibonacci Ratio Analysis. However, that is not sufficient to bring your harmonic pattern trading to another level. There is a need to pin down the harmonic pattern in terms of the science, that are the price dynamics and cycles.

Although the harmonic pattern are used by many successful trading strategies, no book or article will really pin down the science behind the harmonic pattern. The book: Science Of Support, Resistance, Fibonacci Analysis, Harmonic Pattern, Elliott Wave and X3 Chart Pattern (In Forex and Stock Market Trading) is exactly the book dedicated for this topic. This book will tell you the wisdom behind the harmonic pattern in Forex and Stock market trading.

Understanding the scientific principle always help you to bring it further than other traders. This book incorporates the price dynamics and cycles to explain why and how the harmonic patterns are formed in your chart. This also covers why the harmonic pattern and other Fibonacci based patterns are repainting. The book also provides how to detect them as well as how to trade them.

The book can be found in all the major book distributors in the world. Please choose the best book distributor you like from the link below including amazon.com, Google Play Book, scribd.com, Apple Book and so on.

https://www.scribd.com/book/515253555/Science-Of-Support-Resistance-Fibonacci-Analysis-Harmonic-Pattern-Elliott-Wave-and-X3-Chart-Pattern

https://algotrading-investment.com/portfolio-item/science-of-support-resistance-fibonacci-analysis-harmonic-pattern/

https://www.amazon.com/dp/B0993WZGZD

Harmonic patterns are another fractal wave patterns that frequently used by many financial traders. Harmonic patterns are typically made up from two or three triangles (i.e. three price swings or four price swings). The structures of the harmonic pattern are based on the Fibonacci ratios. Hence, some people consider Harmonic pattern as an advanced Fibonacci price patterns.

Harmonic Pattern Detection could be tedious process if you have to do them manually. You can use the automated tool for your trading. If you are looking for the Harmonic Pattern Scanner, then here are some choice between repainting harmonic pattern scanner and non repainting harmonic pattern scanner. We present one repainting and one non repainting harmonic pattern scanner for your information below.

1. Harmonic Pattern Plus (2014)

Harmonic pattern plus is extremely good product for the price although this is repainting harmonic pattern indicator. With dozens of powerful features including Pattern Completion Interval, Potential Reversal Zone, Potential Continuation Zone, Automatic Stop loss and take profit sizing.

Below are the Links to Harmonic Pattern Plus

https://www.mql5.com/en/market/product/4488

https://www.mql5.com/en/market/product/4475

https://algotrading-investment.com/portfolio-item/harmonic-pattern-plus/

2. X3 Chart Pattern Scanner  (2019)

X3 Chart Pattern Scanner is next generation tools to trade with X3 price patterns in Forex market. With non repainting and non lagging algorithm, this tool can detect with advanced Harmonic Pattern, Elliott Wave Pattern, X3 Pattern structure for your trading. As a bonus, it provides your Japanese candlestick patterns too. X3 Chart Pattern Scanner is type 4 harmonic pattern indicator, which means that you can fine tune your strategy using historical patterns while you are trading the same patterns on live trading.

https://www.mql5.com/en/market/product/41993

https://www.mql5.com/en/market/product/41992

https://algotrading-investment.com/portfolio-item/profitable-pattern-scanner/

Related Products