A rounded, U-shaped base between two similar highs, then a small pullback (the handle); completes on a close above the rim.
William O'Neil's cup with handle: a rounded decline and recovery back to the old high, a shallow handle that shakes out weak holders, and a breakout above the rim.
Cups that are V-shaped or very deep are excluded; the handle low negates the pattern.
How we define it
Rim: two swing highs within 3% of each other, nothing above the rim in between
Cup: at least 4 ATR and 8% deep, at most 50%; the low in the middle 20-80% of the cup; closes fit a U-shaped curve (R² ≥ 0.65); at least 30% of closes in the lower half (U, not V)
Handle: 5-30 candles on 1D (6-40 on 4H, 2-10 on 1W), at most half the cup width, dips at least 1 ATR and stays in the upper half of the cup
Prior trend not down
Breakout (up) / breakdown (down): the first candle close beyond the boundary by at least 3% on 1D and 1W (1.5% on 4H)
Failed breaks: a breakout or breakdown that closes back inside the boundary within 6 candles on 4H, 5 on 1D or 3 on 1W is removed from the list
Trend filter: breakouts only above the 200-period EMA (40-week EMA on 1W), breakdowns only below it
Watchlist: the pattern is complete but unbroken and price is within 3% (or 1 ATR, at most 6%) of the boundary