Chart analysis
Harmonic Pattern Calculator: XABCD Ratios and PRZ
Enter the prices of X, A, B and C: the calculator measures the B and C ratios, checks them against six harmonic patterns and projects the potential reversal zone (PRZ) for D, with targets once D prints.
Harmonic pattern calculator (XABCD)
- Tightest matching PRZ
- 41.75–41.14
- Bat
- Pattern
- Bullish (D is a low)
- B retracement (AB ÷ XA)
- 0.500
- C retracement (BC ÷ AB)
- 0.620
The Bat PRZ comes from three measurements:
- 0.886 of XA: 41.14
- 2.24 projection of BC: 41.16
- AB=CD × 1.27: 41.75
Stop beyond X at 40.00 plus a buffer: the pattern breaks if price trades past X.
| Pattern | B rule | C rule | PRZ for D | Fits? |
|---|---|---|---|---|
| Gartley | 0.618 | 0.382–0.886 | 43.10–42.14 | B off |
| Bat | 0.382–0.500 | 0.382–0.886 | 41.75–41.14 | fits |
| Alternate Bat | 0.300–0.382 | 0.382–0.886 | 41.75–38.37 | B off |
| Butterfly | 0.786 | 0.382–0.886 | 41.75–37.30 | B off |
| Crab | 0.382–0.618 | 0.382–0.886 | 40.01–33.82 | fits |
| Deep Crab | 0.886 | 0.382–0.886 | 40.01–33.82 | B off |
Ratios follow Scott Carney’s rules with a tolerance of ±0.03, and sources disagree slightly on the ranges. The PRZ is a zone to watch: wait for a candle to close back out of it before acting.
The calculator runs in your browser. Nothing you type is saved or sent anywhere.
Educational tool, not financial advice. The results only reflect the numbers you enter and say nothing about future returns. Trading involves a substantial risk of loss.
How to use the harmonic pattern calculator
- Find four clear turning points on your chart: X, the start; A, the end of the first leg; B, the pullback; and C, the bounce. A bullish pattern starts at a low, a bearish one at a high.
- Enter the four prices. The calculator checks that B sits between X and A and that C sits between B and A.
- Read the B and C ratios and the table: each pattern with its rules, its PRZ for D and whether B and C fit.
- The highlighted pattern has the tightest PRZ among those that fit: the three measurements for D agree best there. Write down that zone and the stop it implies.
- When price reaches the zone and a candle closes back out of it, enter the actual low or high at D to get the targets at 0.382 and 0.618 of AD and at A.
The harmonic formulas in plain words
Each leg is measured against an earlier one. The B ratio is the AB leg divided by XA; the C ratio is BC divided by AB. Each pattern allows a range for both, and the calculator accepts values within 0.03 of each edge.
The PRZ is where three independent measurements for D agree: the XA ratio that defines the pattern (0.786 for the Gartley, 0.886 for the Bat, 1.618 for the Crab…), the standard BC projection in the pattern’s range closest to it, and an AB=CD completion. The zone runs from the nearest to the farthest of the three.
B ratio = |A − B| ÷ |A − X|; C ratio = |C − B| ÷ |A − B|
D from XA = A ∓ |A − X| × the pattern’s XA ratio
D from BC = C ∓ |C − B| × the BC projection (1.13, 1.27, 1.618, 2.0, 2.24, 2.618, 3.14 or 3.618)
D from AB=CD = C ∓ |A − B| × the pattern’s AB=CD ratio
Targets = D ± |A − D| × 0.382 and 0.618, then A
Worked example
A bullish setup on a 1-hour chart: X at $40.00, A at $50.00, B at $45.00 and C at $48.10.
- B ratio: $5.00 ÷ $10.00 = 0.500. C ratio: $3.10 ÷ $5.00 = 0.620. B rules out the Gartley (0.618) and the Butterfly (0.786); the Bat and the Crab both fit.
- Bat measurements: 0.886 of XA = $50.00 − $8.86 = $41.14; the 2.24 projection of BC = $48.10 − $6.94 = $41.16; and 1.27 × AB = $48.10 − $6.35 = $41.75.
- The Bat PRZ runs from $41.75 to $41.14, three measurements within $0.61. The Crab’s zone, $40.01 to $33.82, is ten times wider, so the Bat is highlighted.
- The Bat completes inside XA, so the stop goes beyond X at $40.00, plus a buffer.
- Price trades down to $41.05 and a candle closes back above the zone. With D at $41.05, AD is $8.95: T1 = $41.05 + $3.42 = $44.47, T2 = $46.58 and T3 is A at $50.00.
Questions
Which harmonic patterns does the calculator check?
Six: the Gartley, Bat, Alternate Bat, Butterfly, Crab and Deep Crab, with Scott Carney’s ratios. The harmonic patterns lesson explains how each one differs, and sources disagree slightly on the exact ranges.
What does PRZ mean?
Potential reversal zone: the band where several Fibonacci measurements for point D cluster. A narrow zone, where the measurements agree, is more useful than a wide one, because the entry, stop and targets become clear. The PRZ trading guide covers how to trade it.
Why do two patterns fit the same points?
The ranges overlap. A B at 0.50 fits both the Bat and the Crab, and only D decides which one completes. The calculator highlights the pattern with the tightest PRZ, and shows the others so you know where the next zone is if the first one breaks.
Is a harmonic pattern a buy or sell signal?
No. The PRZ is a place to watch. Wait for price to reach it and for a candle to close back out of it, and size the trade from the stop. Patterns fail often, and a failure looks exactly like the setup at first.
UpTickFlow is our product. These guides are education, not financial advice. Trading involves a substantial risk of loss.