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

DirectionXABCD
BullishLowHighLowHigh (above A)Low → Buy
BearishHighLowHighLow (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.

LegMeasurementTargetCheck Type
ABRetracement of XA0.382–0.618inRange
XCExtension — |XC| / |XA| (C is beyond A)1.272–1.414inRange
XDRetracement of XC (full XC move)0.786isNear (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.