Shark Pattern

The Shark is a 5-point harmonic pattern with non-standard internal notation. The implementation maps the conventional XABCD labels to O, X, A, B, C (origin + 4 swing points), which means the ratio measurements differ from other harmonic patterns.

Point Mapping

Standard labelInternal labelRole
X (origin)OStarting extreme
AXFirst swing
BAIntermediate swing
CBExtension peak/trough
DC (entry)Reversal entry point

XABCD Structure

DirectionOXABC (entry)
BullishLowHighLowHigh (beyond O)Low → Buy
BearishHighLowHighLow (beyond O)High → Sell

The PRZ is the price band between B and C (the entry).

Fibonacci Ratios

FIB_TOLERANCE = 0.05 (5%) applies to all isNear checks.

MeasurementTargetCheck Type
|OB| / |OX| — how far B moved from O relative to the OX leg1.13–1.618inRange
XC retracement of XA (entry C relative to X→A leg)0.886isNear (exact)

Confidence

Confidence is based on the XC retracement error only:

confidence = 1 − xcError

Clamped to [0, 1].

SL/TP

  • SL: beyond X (the origin swing, equivalent to O), ±0.1% buffer
  • TP1: C + 0.382 × |A − C|
  • TP2: C + 0.618 × |A − C|
  • TP3: A price

Levels are scalable via per-pattern TradingConfig multipliers. See TP Level Calculation.