Cypher Pattern
The Cypher is a 5-point XABCD harmonic pattern. Its defining characteristic is that C extends beyond A (XC > XA), and D is then a retracement of the entire XC move — not just the CD leg. This gives D a tight clustering around the 0.786 of the full XC range.
XABCD Structure
| Direction | X | A | B | C | D |
|---|---|---|---|---|---|
| Bullish | Low | High | Low | High (above A) | Low → Buy |
| Bearish | High | Low | High | Low (below A) | High → Sell |
The PRZ is the price band between C and D.
Fibonacci Ratios
FIB_TOLERANCE = 0.05 (5%) applies to all isNear checks.
| Leg | Measurement | Target | Check Type |
|---|---|---|---|
| AB | Retracement of XA | 0.382–0.618 | inRange |
| XC | Extension — |XC| / |XA| (C is beyond A) | 1.272–1.414 | inRange |
| XD | Retracement of XC (full XC move) | 0.786 | isNear (exact) |
Note: XC > XA is a hard requirement. If C has not extended past A, the pattern is invalid.
Confidence
Confidence is based on the XD retracement error:
confidence = 1 − xdError
Clamped to [0, 1].
SL/TP
Unlike most harmonics, the SL for Cypher is placed beyond X (not beyond D), and TPs use the full XC move as the measuring rod.
- SL: beyond X, ±0.1% buffer
- TP1: D ± 0.382 × |XC|
- TP2: D ± 0.618 × |XC|
- TP3: C price
(± sign is direction-dependent: bullish adds, bearish subtracts)
Levels are scalable via per-pattern TradingConfig multipliers. See TP Level Calculation.