Double Top & Double Bottom

Double Top and Double Bottom are classic reversal structure patterns. They signal exhaustion after two attempts to break the same price level. Detection uses five swing points (X, A, B, C, D) where X and B form the matching peaks or troughs.

Constant: DOUBLE_TOP_TOLERANCE = 0.03 (3%)

Double Top (Bearish)

Price makes two highs at roughly the same level, separated by a pullback (the neckline).

PointRole
XFirst high (peak 1)
APullback low (neckline valley)
BSecond high (peak 2 ≈ X)
CSecond low (confirms breakdown)
DFinal high used internally

Validity: |X − B| / X ≤ 3% — both peaks must be within 3% of each other.

PRZ: ±0.2% band around A (the neckline).

Confidence: 1 − priceDiff / tolerance where priceDiff = |X − B| / X.

Double Bottom (Bullish)

Mirror image of Double Top.

PointRole
XFirst low (trough 1)
ABounce high (neckline peak)
BSecond low (trough 2 ≈ X)
CSecond high (confirms breakout)
DFinal low used internally

Validity: |X − B| / X ≤ 3% — both troughs within 3%.

PRZ: ±0.2% band around A (the neckline).

SL/TP

SL and TPs use the measured move (patternHeight = |A − X|):

  • Double TopSL: above the higher of X or B, ±0.1%; TP1: neckline − 0.5×height; TP2: neckline − 1×height; TP3: neckline − 1.5×height
  • Double BottomSL: below the lower of X or B, ±0.1%; TP1: neckline + 0.5×height; TP2: neckline + 1×height; TP3: neckline + 1.5×height

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