TradingView chart patterns

Cup and handle pattern: define the shape and the breakout

A cup and handle pattern is a rounded price correction followed by a smaller pullback near the previous high. It is usually interpreted as a possible bullish continuation. The cup gives the broader structure; the handle supplies a separate breakout test. A completed outline does not establish that price will rise, and the breakout rule must specify which resistance level price has to cross.

See the decision guide

Read the cup, rims and handle on one annotated example

The cup and handle chart pattern has a broad U-shaped base. A sharp drop and immediate rebound is a V-shaped recovery, which needs a different classification. The handle is the smaller consolidation after the right rim. IG describes a shallow handle in the upper part of the cup; this guide uses an explicit depth rule below so the label can be checked.

  • Cup depth is 100 - 80 = 20 price units, or 20% of the 100 rim price. Handle depth is 100 - 94 = 6 units, or 30% of cup depth. Those percentages have different denominators.
  • A cup with handle pattern and a cup handle pattern name the same structure. The wording does not define how round the base must be or when a signal becomes usable.
  • For this illustration, the horizontal rim level is the breakout threshold. A descending handle trendline may be crossed earlier and below 100; that would be a different signal.
Original hypothetical price sketch; prices and spacing are illustrative, not market datatext
Price
102 |                                               x  confirmed close
100 |----L-------------------------R---------------/--- rim resistance
    |     \                       / \             /
 94 |      \                     /   \____H_____/     handle low
    |       \                   /
 80 |        '-------B---------'
    +--------------------------------------------------> time
         left rim   cup low    right rim   handle   break

L = 100    B = 80    R = 100    H = 94    x = 102
Cup: L to R, 40 bars. Handle: R to x, 8 bars.
This example waits for a close above 100.

Cup and handle pattern rules need explicit tolerances

The following is a custom research specification for the sketch, not a universal definition or a recommended parameter set. Use ordinary price candles and positive prices. Save the selected rims and cup low before testing the handle; do not move the levels after seeing the outcome.

  • These depth and duration checks do not measure roundness. For a detector, also choose a shape test, such as a declared curve-fit method and error limit. A V can pass the numerical bounds above.
  • Declare how competing rim pairs are selected. One reproducible choice is to evaluate the newest confirmed right rim with the nearest earlier eligible left rim, keeping only one active candidate.
  • On a daily chart, 40 bars means 40 trading sessions. The same bar count on a five-minute chart describes a different duration and requires a separate evaluation.
MeasurementIllustrative acceptance ruleSketch result
Prior advanceLeft rim is at least 10% above the close 20 bars before itAssume that earlier close is 88: 13.6% advance
Rim agreementAbsolute rim-price difference / left-rim price is at most 1%Both rims are 100: 0% difference
Cup depth(Higher rim - cup low) / higher rim is 10% to 30%(100 - 80) / 100 = 20%
Cup duration30 to 80 bars between rim bars, inclusive40 bars qualifies
Handle duration5 to 15 bars after the right rim, inclusive, and shorter than the cupBreakout on bar 8 qualifies
Handle depth(Right rim - lowest handle low) / cup depth is at most 35%(100 - 94) / 20 = 30%
BreakoutFirst eligible completed close crosses above the higher rimPrevious close 99; current close 102 crosses 100

Use volume as a separate, auditable filter

For a cup and handle stock pattern, an optional experiment can require quieter handle trading and stronger volume on the breakout. State the calculation instead of judging bar colors by eye. The numbers below are hypothetical filters; this page has not measured whether they improve results.

  • Exclude the signal bar from its own comparison average. Keep regular-session and extended-session settings consistent across samples.
  • Treat a missing or zero denominator as unavailable data. Do not silently convert it into a passing filter, and do not assume every feed reports comparable traded volume.
  • Count rejected signals as well as accepted signals. A filter can remove losing breakouts and also remove winners; compare both groups before keeping it.
FilterCustom calculationIllustrative result
Handle contractionAverage volume after the right rim and before the signal / average volume over the cup is at most 0.80.6 million / 1 million = 0.6, passes
Breakout expansionCompleted signal-bar volume / mean volume of the previous 20 completed bars is at least 1.51.8 million / 1 million = 1.8, passes

How TradingView built-in recognition differs

TradingView documents its own detection rules. They do not match the custom rim-break example above. Its help page was checked on October 16, 2026.

  • The built-in Failed state can follow a rollback-threshold breach before the target or a handle that becomes too long. Our custom failure rule below instead uses a close back under the saved rim.
  • Compare detectors using their saved levels, inputs and event times. Matching names do not imply matching signals.
Built-in behaviorDocumented rule
Search windowThe latest 600 bars
Geometry5/5 pivots anchor the shape; minimum cup width is 20 bars and the handle cannot outlast the cup
ConfirmationA close above the handle line triggers the breakout alert
Tolerance inputsRim deviation and handle rollback are percentages of cup height; cup rollback is relative to the preceding trend, with that trend check disabled by default
In ProgressIncludes developing shapes whose last point may not be a confirmed pivot

A breakout can fail without changing the original drawing

For the hypothetical 100 rim and 94 handle low, keep the following states. Check candidate rejection before evaluating a new breakout. Once a breakout has been recorded, preserve its timestamp even if later prices reverse.

  • A wick above 100 followed by a 99.5 close never confirms this example. A 102 close followed later by a 99.5 close is a confirmed event followed by failure.
  • Adding cup depth to the rim gives an illustrative projection of 100 + 20 = 120. This geometric reference is not a probability estimate or evidence that 120 will be reached.
  • A signal at the close does not assure a fill at that price. Specify order timing, position size, commissions, slippage and a protective exit separately. Waiting until a failed close can expose a position to larger intrabar losses.
StateRule in this exampleMeaning
CandidateGeometry is accepted; no eligible close above 100 yetNo breakout event
Rejected candidateHandle retracement exceeds 35% of cup depth, or no breakout occurs by bar 15 after the right rimThe saved setup expires
Confirmed breakoutFirst eligible close crosses from 100 or below to above 100Record a signal, not an assumed fill
Failed breakoutA subsequent completed close falls below 100The close-based breakout has failed under this rule

Record when the pattern was knowable before testing it

A confirmed pivot uses later candles. A five-bar right-side pivot at bar 50 cannot be confirmed before bar 55. Drawing its marker back on bar 50 does not make it an available signal there. TradingView explains this historical plotting issue in its repainting documentation.

  • Give Pineify the chosen rim-selection method, shape test, depth limits, duration bounds, volume rules and invalidation rules. Request separate candidate, confirmation and failure outputs with timestamps.
  • Review the generated detector and explicitly request a syntax check. Confirmed-bar conditions address changing intrabar prices, but they do not repair future-data leakage or backdated pivot signals.
  • If a breakout occurred before all required points became known, reject it or classify it separately. Do not give a historical strategy an entry on a bar where its required information was unavailable.
  • To evaluate trades, add explicit entry and exit rules, then export the TradingView strategy trade list to Backtest Deep Report. Review drawdown and trade results across separate periods with costs included. The report cannot recover missed candidates or repair biased signal timing from a trade CSV.
Where Pineify fits

Pine Script AI Coding Agent

Draft an adjustable cup-and-handle detector from the rules you specify. Review the code, request syntax validation and test confirmation timing in TradingView. This page explains the pattern; it does not run a market scan.

Also useful: Backtest Deep Report. Analyze a TradingView strategy trade-list CSV after defining entries, exits and costs. Results describe that supplied test, not a guarantee of future breakout performance.

Draft my cup-and-handle rules

Frequently asked questions

Educational information, not investment advice. The chart, prices, volume values and custom thresholds are hypothetical. No strategy performance or success rate has been measured here. A confirmed pattern can fail and trading can lose money.

Sources and verification

Published by Pineify. Pineify is an independent product and is not affiliated with TradingView. Sources support the technical explanations; examples do not establish trading performance.