On this page
- What are harmonic patterns?
- The Fibonacci ratios used
- The ABCD pattern: the building block
- The four main harmonic patterns and their ratios
- Gartley pattern
- Bat pattern
- Butterfly pattern
- Crab pattern
- How to draw harmonic patterns on MT5
- Harmonic pattern trading: a step-by-step plan
- Example 1: bullish Gartley on EUR/USD (H4)
- Managing the trade after entry
- Example 2: bearish Bat on gold (H1)
- Confirming harmonic patterns with other tools
- Common harmonic trading mistakes
- Practise harmonic patterns with Xellion
Harmonic patterns are price structures that use Fibonacci ratios to find areas where a move may end and reverse. Instead of waiting for a pattern to finish and then chasing the breakout, harmonic trading tries to identify in advance the zone where the last leg is likely to stop. That zone is called the potential reversal zone, or PRZ.
The best-known harmonic patterns are the Gartley pattern, the Bat pattern, the Butterfly pattern and the Crab pattern. They all share the same five-point shape, labelled X, A, B, C and D, and differ only in their Fibonacci ratios. This guide explains each pattern with its ratios, starts with the simpler ABCD pattern, shows how to draw a harmonic pattern on MT5, and walks through two example trades with entry, stop-loss level and targets. All prices are example prices. One point first: harmonic patterns need precise measurement and patience. Many patterns that look right at first fail the ratio checks, and even valid ones do not always reverse.
What are harmonic patterns?
Harmonic patterns were first described by H.M. Gartley in 1935. Later traders, especially Scott Carney and Larry Pesavento, refined the ratios and added new patterns such as the Bat and the Crab. The idea is that price often moves in measured swings that relate to each other through Fibonacci ratios.
| Term | Meaning |
|---|---|
| X, A, B, C, D | The five turning points of the pattern |
| XA, AB, BC, CD | The four legs between those points |
| Retracement | How far one leg pulls back the previous leg (for example 0.618) |
| Extension or projection | How far a leg extends beyond a previous leg (for example 1.27 or 1.618) |
| Potential reversal zone (PRZ) | The price area where several ratios meet near point D |
A bullish harmonic pattern looks like an "M" and completes at a low point D, where traders look to buy. A bearish harmonic pattern looks like a "W" and completes at a high point D, where traders look to sell.
If Fibonacci levels are new to you, read our Fibonacci retracement trading guide first. Harmonic trading is built entirely on those ratios.
The Fibonacci ratios used
The main Fibonacci ratios in harmonic pattern trading are 0.382, 0.50, 0.618, 0.786 and 0.886 for retracements, and 1.13, 1.27, 1.618, 2.24, 2.618 and 3.618 for extensions. You do not need to memorise them all at once – the pattern table below shows which ones matter for each pattern.
The ABCD pattern: the building block
Before learning five-point patterns, start with the ABCD pattern. It has only three legs:
- AB – the first move.
- BC – a pullback of 0.618 to 0.786 of AB.
- CD – a move in the same direction as AB, usually equal in length to AB, or 1.27 to 1.618 times the BC leg.
When CD equals AB in price (and ideally in time), point D is a possible reversal area. The ABCD pattern also appears inside every harmonic pattern: the last three legs of a Gartley, Bat, Butterfly or Crab form an ABCD.
The four main harmonic patterns and their ratios
| Pattern | B retracement of XA | C retracement of AB | D relative to XA | CD as extension of BC |
|---|---|---|---|---|
| Gartley pattern | 0.618 | 0.382–0.886 | 0.786 retracement | 1.27–1.618 |
| Bat pattern | 0.382–0.50 | 0.382–0.886 | 0.886 retracement | 1.618–2.618 |
| Butterfly pattern | 0.786 | 0.382–0.886 | 1.27–1.618 extension (beyond X) | 1.618–2.618 |
| Crab pattern | 0.382–0.618 | 0.382–0.886 | 1.618 extension (beyond X) | 2.24–3.618 |
Different authors quote slightly different ranges; these are the commonly used versions. Two groups are worth remembering:
- Retracement patterns (Gartley and Bat): point D stays inside the XA leg. The stop-loss level usually goes just beyond X.
- Extension patterns (Butterfly and Crab): point D goes beyond X. The stop-loss level goes beyond the D extension zone.
Gartley pattern
The Gartley pattern is the original harmonic pattern. Its key features are a B point at 0.618 of XA and a D point at 0.786 of XA. Because D sits well inside the XA leg, the pattern is often treated as a pullback within a larger trend.
Bat pattern
The Bat pattern has a shallower B point (0.382 to 0.50 of XA) and a deeper D point at 0.886 of XA. The 0.886 level is the defining ratio of the Bat. The stop-loss level is usually just beyond X, which keeps it fairly close to entry.
Butterfly pattern
The Butterfly pattern has a deep B point at 0.786 of XA, and D extends beyond X to 1.27 (sometimes up to 1.618) of XA. It often appears at the end of a strong move, when price makes a new high or low and then reverses. Note that the phrase "butterfly pattern" is also used for an options strategy; the chart pattern here is unrelated.
Crab pattern
The Crab pattern has the most extreme D point: an extension of 1.618 of XA, with a CD leg that can reach 2.24 to 3.618 times BC. Crabs form after sharp, fast moves. The reversal can be strong, but stops need room because price has already moved a long way.
How to draw harmonic patterns on MT5
MT5 does not include a built-in harmonic pattern indicator or scanner. Traders either draw the pattern by hand with the standard tools or install a custom indicator.
Drawing by hand:
- Open MT5 and log in (server Xellion-Live). Our MT5 download, login and setup guide covers installation on Android, iPhone, PC and web.
- Find a clear swing: point X to point A.
- Use Insert → Objects → Fibonacci → Fibonacci Retracement on XA. Check where B sits (0.618 for a Gartley, 0.382–0.50 for a Bat, and so on).
- Draw a second Fibonacci retracement on AB to check C.
- Project D: use the XA retracement (0.786 or 0.886) or extension (1.27 or 1.618) and a Fibonacci Expansion on the BC leg. Add the 1.27 and 1.618 extension levels in the tool's settings if they are not already listed.
- Connect X–A–B–C–D with trend lines so the shape is clear, and shade the PRZ with a rectangle.
Using a custom indicator: Harmonic pattern indicators and scanners are available in the MetaTrader Market and the MQL5 code base. Read the description and reviews carefully, and be aware that some scanners redraw patterns as new candles form. Always check the ratios yourself before acting.
Harmonic pattern trading: a step-by-step plan
- Find the XA leg – a clear impulse move on H1, H4 or D1.
- Check B and C against the ratio table.
- Mark the PRZ where the XA ratio, the BC extension and AB = CD come together. The tighter the cluster, the better.
- Wait for price to reach the PRZ. Do not enter early.
- Look for confirmation: a reversal candle from our candlestick patterns guide, or momentum divergence on the stochastic oscillator or RSI.
- Enter on the close of the confirmation candle.
- Place the stop-loss level beyond X (Gartley, Bat) or beyond the PRZ (Butterfly, Crab). Some traders add a buffer of part of the ATR – see the ATR indicator guide.
- Set targets at 0.382 and 0.618 retracements of the AD leg.
Example 1: bullish Gartley on EUR/USD (H4)
All prices are example prices.
| Point | Price | Check |
|---|---|---|
| X | 1.1500 | Swing low |
| A | 1.1700 | XA = 200 pips |
| B | 1.1576 | 0.618 retracement of XA |
| C | 1.1653 | 0.618 retracement of AB (124 pips) |
| D (PRZ) | 1.1543 | 0.786 retracement of XA |
CD is 110 pips, about 1.43 times BC (77 pips) – inside the 1.27–1.618 range – and close to AB at 124 pips. Several measures meet near 1.1543, so the PRZ is well defined.
Price reaches 1.1545 during the London session and a bullish engulfing candle closes at 1.1552.
| Item | Level | Calculation |
|---|---|---|
| Entry | 1.1552 | Close of the engulfing candle |
| Stop-loss level | 1.1520 | Beyond the 0.886 level of XA |
| Planned loss | 32 pips | 1.1552 – 1.1520 |
| Target 1 | 1.1603 | 0.382 retracement of AD (157 pips) |
| Target 2 | 1.1640 | 0.618 retracement of AD |
| Distance to targets | 51 and 88 pips | About 1.6:1 and 2.75:1 |
Many traders close part of the position at target 1 and move the stop-loss level to entry.
Managing the trade after entry
What happens in the first few candles after entry tells you a lot about a harmonic pattern:
- Quick reaction away from D – the PRZ is holding. Many traders leave the trade alone until target 1.
- Price stalls in the PRZ for several candles – the pattern is weaker than it looked. Some traders reduce the position or tighten the stop-loss level to just beyond D.
- Price closes beyond the stop-loss level – the pattern has failed. Accept the planned loss and do not re-enter the same pattern; a failed Gartley or Bat often leads to a continued move in the original direction.
Writing these rules down before entry stops you from changing the plan when the trade is open.
Example 2: bearish Bat on gold (H1)
All prices are example prices.
| Point | Price | Check |
|---|---|---|
| X | $4,100 | Swing high |
| A | $4,000 | XA = $100 |
| B | $4,050 | 0.50 retracement of XA |
| C | $4,019 | 0.618 retracement of AB |
| D (PRZ) | $4,089 | 0.886 retracement of XA |
CD is $70, about 2.26 times BC ($31), inside the Bat's 1.618–2.618 range.
At about 7:30 pm IST, gold reaches $4,089, and a bearish pin bar closes at $4,084.
| Item | Level | Calculation |
|---|---|---|
| Entry | $4,084 | Close of the pin bar |
| Stop-loss level | $4,104 | Just above X |
| Planned loss per ounce | $20 | $4,104 – $4,084 |
| Target 1 | $4,055 | 0.382 retracement of AD ($89) |
| Target 2 | $4,034 | 0.618 retracement of AD |
On most MT5 accounts, 1 lot of gold is 100 ounces, so at 0.01 lot each $1 move is worth about $1. A $20 stop at 0.01 lot is a planned loss of about $20, before costs. Choose the lot size from that stop distance; our lot size and pip calculator guide shows how.
Confirming harmonic patterns with other tools
A PRZ is stronger when other analysis points to the same area:
- Horizontal levels: D lands on a support and resistance level or round number.
- Ichimoku: D lands at the edge of a thick Ichimoku cloud or on a flat Kijun-sen.
- Momentum divergence: price makes a new low into a bullish D while the stochastic or RSI makes a higher low.
- Session timing: patterns completing during the London session (from about 1:30 pm IST in winter) or the New York session (from about 6:30 pm IST in winter) tend to see more follow-through than those completing in the quiet early IST morning.
Harmonic patterns are one family among many forex chart patterns. If you prefer simpler structures, the head and shoulders pattern and triangles need fewer measurements.
Common harmonic trading mistakes
| Mistake | What happens | Better approach |
|---|---|---|
| Forcing ratios to fit | Trading patterns that are not valid | If B or D is outside the range, skip it |
| Entering before D is reached | Price keeps going past the PRZ | Wait for D and a confirmation candle |
| No stop-loss level beyond X or the PRZ | One failed pattern causes a large loss | Set the stop before entry |
| Trusting a redrawing scanner | The pattern disappears after entry | Check the ratios yourself on closed candles |
| Trading patterns on M1 to M5 | Noise creates many false patterns | Use H1, H4 and D1 |
| Ignoring news | Data releases blow through the PRZ | Check the economic calendar |
Remember that a valid pattern only marks an area where reversal is more likely. It is not a forecast. Some patterns fail, and the stop-loss level is there for those.
Practise harmonic patterns with Xellion
You can draw harmonic patterns with the Fibonacci and trend-line tools on MetaTrader 5 (server Xellion-Live), or add a custom harmonic indicator, and follow your trades on the Xellion app for iOS and Android or on WebTrader. A free demo account lets you practise measuring XA, B, C and D and test entries at the PRZ with live prices and no real money.
When you are ready to go live:
- Choose an account on the accounts page: Standard (minimum $50), Raw (minimum $250) or Zero (minimum $750).
- Fund it on the funding page: UPI deposits are instant, from $50.
- Base position sizing on the stop-loss level beyond X or the PRZ. Leverage goes up to 1:2000, which lowers the margin needed, but lot size decides what each pip is worth.
Scalping is not permitted on Xellion accounts; harmonic patterns are best traded on H1, H4 and daily charts anyway.
CFDs are complex instruments and carry a high risk of losing money. Not investment advice.
What are harmonic patterns in trading?
Harmonic patterns are five-point price structures (X, A, B, C, D) whose legs relate to each other through Fibonacci ratios. They are used to find a potential reversal zone where the final leg may end.
What is the difference between the Gartley and Bat patterns?
Both complete inside the XA leg. The Gartley has B at 0.618 and D at 0.786 of XA. The Bat has a shallower B at 0.382 to 0.50 and a deeper D at 0.886 of XA.
What is the potential reversal zone (PRZ)?
The PRZ is the price area near point D where several Fibonacci measurements meet, such as the XA retracement, the BC extension and AB = CD. Traders wait for price to reach it and confirm before entering.
Are harmonic patterns available on MT5?
MT5 has no built-in harmonic pattern indicator. You can draw patterns by hand with the Fibonacci retracement, Fibonacci expansion and trend-line tools, or install a custom harmonic indicator.
Where should the stop loss go on a harmonic pattern?
For Gartley and Bat patterns, just beyond point X. For Butterfly and Crab patterns, which extend beyond X, just beyond the PRZ around point D.
Which harmonic pattern is best for beginners?
Many traders start with the ABCD pattern because it has only three legs, then move on to the Gartley and Bat, which have clear D levels inside the XA leg.
Which timeframe is best for harmonic trading?
H1, H4 and daily charts work best. Lower timeframes produce many patterns that fail because of noise.
This article is general information and education, not investment advice. CFDs are complex instruments and carry a high risk of losing money rapidly due to leverage.



