Home › Guides › Cup and Handle Pattern

WHY BOTS FAILFREENO ACCOUNTAUTOMATED TRADE BOTSCup and HandlePatternThe arithmetic of how bots failEDUCATION ONLY | NO SIGNALSEXAMPLE NUMBERS ARE LABELLEDAUTOMATED TRADE BOTSautomatedtradebots.com
A free page on cup and handle pattern. Education only, with example numbers labelled.
WHY BOTS FAIL

Cup and Handle Pattern

Short answer

The cup and handle pattern is a chart shape: price falls and curves back up to about the same level, forming a cup, then pulls back a little, forming a handle. The breakout is a close above the rim.

A rounded dip, a recovery to the old high, a small pullback, then a move above the rim. The shape is easy to draw by eye. It is hard to define in numbers.

The page explains the idea in plain words, works through the arithmetic with a table, and shows how it hits grid, martingale and DCA bots, then tells you what to check before you run one.

  • A worked example with real arithmetic
  • How it hits grid, martingale and DCA bots
  • How to check for it before you run a bot
  • No advice, no signals, no profit promises

Last reviewed 28 October 2026. Education only, not advice.

Free, no account Runs in your browser Worked numbers shown Not advice Examples labelled

Ready to go further

Next: learn the shapes around it

The chart patterns guide shows how bots turn a shape into rules, and where those rules break.

Read chart patternsFree, no account
Reading time8 minutes
Worked exampleExact arithmetic
Tools linked0 on this page
Reviewed28 Oct 2026

What is included

  • What it is, in plain words
  • The formula or mechanism, with exact arithmetic
  • How it hits grid, martingale and DCA bots
  • A check you can run before you switch a bot on

Who it is for

  • People who run or plan to run a trading bot
  • Anyone reading a backtest or a bot sales page
  • Readers who want the numbers, not the pitch
  • Not advice, and not a signal service
A made-up cup and handle: rim, cup, handle, breakout8090100181420Breakout 100.0Bar numberMade-up closes, not a real market. Levels calculated by us on 31 Oct 2026, exact.
The picture for this page. Example numbers are made up unless the page says they were calculated.

Key facts

  • The cup and handle pattern is a chart shape: price falls and curves back up to about the same level, forming a cup, then pulls back a little, forming a handle. The breakout is a close above the rim.
  • In the made-up example here, the left rim is 100.0, the cup bottom is 80.0 and the right rim is 98.5. The cup is 20.0 points deep (calculated by us on 31 Oct 2026, exact).
  • The usual measured target adds the cup depth to the breakout level. Here that is 100.0 + 20.0 = 120.0. It is a rule of thumb for drawing, not a forecast.
  • There is no standard definition. How round the cup is, how deep, how long and how big the handle may be are all choices, so two people can disagree about the same chart.
  • With the same 20 made-up closes, a rim tolerance of 2 percent passes and a rim tolerance of 1 percent fails. The rule changes the answer, not the chart.

What the pattern is

The cup and handle pattern is one of the classic chart patterns. It has four parts.

  • The left rim. A prior high where price starts to fall.
  • The cup. A fall to a low, then a gradual rise back toward the rim. The shape is meant to be rounded, like a bowl or a U. A sharp V is usually not counted.
  • The right rim. The point where the recovery reaches roughly the level of the left rim.
  • The handle. A short, shallow pullback after the right rim. It is meant to be smaller and shorter than the cup.

The breakout is a move above the rim level after the handle. Chart readers see this as the pattern completing. The story behind it is that holders who were stuck at the old high have sold or given up during the cup, so there is less supply left when price returns to it. That is an explanation people give. It is not proven here, and it does not mean the pattern works.

The rim, the handle and the breakout level

The two rims rarely match exactly, so a rule needs to say how close is close enough. Most people take the breakout level as the higher of the two rims. In the made-up path, the left rim is 100.0 and the right rim is 98.5, a gap of 1.50 percent of the left rim. The breakout level is 100.0.

The handle is the part that makes the pattern look different from a plain recovery. It is a pause just under the rim. Here it falls from 98.5 to 95.5, a drop of 3.0 points. That is 15.0 percent of the cup depth, and it lasts 3 bars against 13 bars for the cup. Many descriptions say the handle should give back no more than about a third to a half of the cup. Sources vary, so treat any such number as a setting, not a fact.

The usual measured target

A measured move projects the size of the pattern past the breakout. For this pattern, the common version is the cup depth added to the breakout level.

Cup depth = rim - cup bottom
Measured target = breakout level + cup depth

It is a way to mark where a move of the same size would end. Price may stop short of it, pass it, or never break out at all. The target is arithmetic on a drawing.

A worked example with made-up numbers

Take the made-up closes in the picture. Bar 1 closes at 100.0. The low close is 80.0 on bar 8. The right rim is bar 14 at 98.5. The handle low is 95.5 on bar 17. Bar 20 closes at 99.0. Suppose, for the arithmetic only, that a trader treated a close of 99.0 as the breakout, entered there, and put a stop at the handle low. The rows below show the numbers.

ItemWorkingResult
Rim gap100.0 vs 98.51.50%
Cup depth100.0 - 80.020.0 points
Breakout levelThe higher rim100.0
Handle drop98.5 - 95.53.0 points (15.0% of the cup)
Measured target100.0 + 20.0120.0
Risk if stop at handle low99.0 - 95.53.5 points
Reward to target120.0 - 99.021.0 points

All numbers are made up, calculated by us on 31 Oct 2026, exact. The ratio of reward to risk here is 21.0 to 3.5, or 6.00 to 1. That ratio only holds if the target is reached, and it ignores spread, fees and slippage. See the risk reward ratio page for why a ratio alone says little.

One more point. The breakout level here is 100.0, set by the left rim. The close on bar 20 is 99.0, which is under that line, so a strict rule that waits for a close above 100.0 would not have fired yet. A looser rule that uses the right rim of 98.5 would have. The same chart gives a different answer depending on the definition.

Why it is subjective

The pattern is easy to see after the fact and hard to define before. Each of these is a judgment.

  • Which high is the left rim? A wick or a close, the last high or a bigger one?
  • How round is round? No standard test separates a cup from a V or a wide base with a flat floor.
  • How deep and how long? A cup might last a few weeks or many months. Depth ranges are a matter of opinion.
  • How big may the handle be? The limit is a setting. So is the number of bars.
  • What counts as the breakout? A touch, a close, a close with extra volume, or a close that holds for several bars?

Because there are so many choices, a person looking back through charts can usually find some set of choices that makes a given shape qualify. That is the hindsight problem behind overfitting.

How to define it in code with tolerances

A bot cannot look at a picture. It needs a list of numeric tests with limits. A simple version has five steps.

  • Find the pivots. A pivot high is the highest close with M lower closes on each side. Use only bars that have already closed. A pivot is only known M bars later, and using it earlier is look-ahead bias.
  • Rim test. The two rim closes must be within a tolerance, for example 2 percent of the left rim.
  • Cup test. Depth as a share of the left rim must sit between a minimum and a maximum. A roundness check might require the bottom to be roughly in the middle of the cup rather than at either end.
  • Handle test. The handle drop must be positive, at most some share of the cup depth, and last no more than some share of the cup length.
  • Breakout test. A close above the higher rim.

Each limit is a number someone chose. Here is the effect on the made-up path. The measurements do not change: the rim gap is 1.50 percent, the cup depth is 20.0 percent of the left rim and the handle gives back 15.0 percent of the cup. Only the limits do.

Rule settingRim gapCup depthHandle shareResult
Base: rim 2%, depth 10 to 35%, handle up to 50%1.50%20.0%15.0%Pass
Tight rim: rim 1%1.50%20.0%15.0%Fail
Deeper cup only: depth 25 to 35%1.50%20.0%15.0%Fail
Shallow handle: up to 10%1.50%20.0%15.0%Fail

Made-up path, calculated by us on 31 Oct 2026, exact. One chart is a pass under one setting and a fail under three others. A backtest of this rule would trade different bars for each setting, and each setting can be defended. That is why one good backtest says little. The sensitivity to settings is the first thing to measure. See how to backtest and walk-forward testing.

Three measurements of the made-up path1.5%Rim gappercent of left rim20.0%Cup depthpercent of left rim15.0%Handle sharepercent of cup depthMeasurements of the made-up path. Calculated by us on 31 Oct 2026, exact.
The three measurements behind the rule, taken from the made-up path. A different limit on any of them changes the result.

How the pattern fails

  • No breakout. Price stalls under the rim, rolls over and never closes above it. The pattern then never completes.
  • A false breakout. Price closes above the rim, then falls back below it within a few bars. A stop at the handle low takes the loss of 3.5 points in this example. See false breakout.
  • The handle deepens. If the handle gives back more than the limit, the shape turns into a second leg down or a double top, and the label no longer fits. See also double bottom for a related shape.
  • Target not reached. The measured target is arithmetic. Price can turn around well before it, and a move that stalls halfway never reaches 120.0.
  • Costs and gaps. A breakout order can fill worse than the trigger when price jumps. That is slippage, and it eats into a 21.0-point reward.
  • Too few trades. A strict definition finds a handful of patterns across years of data. A handful of trades cannot separate skill from luck.

Where it fits with other pages

A cup and handle breakout is a form of breakout trading: a trade placed when price leaves a range or passes a marked level. It shares the same risks, such as false breaks and costs at the trigger. The rim is also a horizontal line of the kind covered under support and resistance.

What this does not tell you

It does not say how often the pattern appears, how often it completes, or whether trading it earns anything after costs. Every price and result on this page is made up to show the arithmetic and the problem of definition. This is education, not a signal.

FAQ

Frequently Asked Questions

What is the cup and handle pattern?

A chart shape with a rounded dip and recovery to the old high, followed by a small pullback called the handle. The breakout is a close above the rim. It is a drawing convention and does not forecast anything.

How is the target of a cup and handle measured?

The usual method adds the cup depth to the breakout level. In the made-up example here, 100 + 20 = 120. It marks a distance, not a prediction.

How big should the handle be?

There is no fixed answer. Many descriptions say a fraction of the cup depth, but sources differ, so a bot treats it as a setting and tests how sensitive the result is to it.

Why is the cup and handle hard to code?

The shape has no standard definition. Rim match, cup depth, roundness, handle size and breakout rule are all choices, and small changes to them change which charts qualify.

What happens when the pattern fails?

Price may stall under the rim, break out and reverse, or deepen the handle into a larger fall. A stop is hit in those cases and costs such as slippage add to the loss.

Are the numbers on this page real?

Example numbers are made up to show how the maths works, and the page says so. A figure only counts as exact when the page says it was calculated on a stated date. Nothing you enter in a calculator leaves your browser.

Can I use this to decide whether to run a bot?

It can show whether a bot's numbers hold together and how much an account can lose. It cannot say what the market will do, and it is not advice. Use it to ask better questions, then read the terms of your own broker or exchange.

Is this financial advice?

No. It is general education about a chart shape. All prices are made up and nothing here is a signal.

Know the Risk Before You Run It

Free calculators and guides, added every week. Leave your details and we will email you when new ones go up.

Trading carries a risk of loss