Trading Education

Rectangle Pattern: Trade the Range or the Breakout

The rectangle pattern is a flat range between two tops and two bottoms. Learn when to trade inside the box, when to buy the breakout, and where the stop goes.

In this guide
  1. What is a rectangle pattern?
  2. How do you spot a real rectangle?
  3. Should you trade inside the box or wait for the breakout?
  4. How do you trade the rectangle breakout?
  5. What happens when the breakout fails?
  6. How does a rectangle compare with a triangle or a flag?
  7. Where does RelicusRoad Pro fit?
  8. Frequently asked questions

You bought the break above the range, and three candles later price was back in the middle of it. The range was real. Your entry wasn’t.

A rectangle pattern is a flat box on the chart: price hits the same top at least twice and the same bottom at least twice, then eventually closes outside. You can trade it two ways. Buy low and sell high inside the box, or wait for a candle to close outside it and trade the break. By the end you’ll know which one fits the box in front of you, and where each trade’s stop belongs.

Key Findings

  • Two tops, two bottoms: a rectangle is drawn only after price has tested both the ceiling and the floor twice at roughly the same levels.
  • No built-in direction: the box is neutral until a candle closes outside it, which is how StockCharts ChartSchool treats the pattern too.
  • Box height sets the target: add the height of the box to the top for an upside break, the classic measured move.
  • A close back inside ends it: once price closes back in the box after a break, the breakout has failed.

What is a rectangle pattern?

It is a pause between two flat lines. After a move, buyers and sellers reach a truce: sellers step in at the same price each time it rises, buyers step in at the same price each time it falls. Price bounces between those two levels until one side gives up, and the first close outside the box shows who won.

The pattern is old. Robert Edwards and John Magee described rectangles as trading-range formations in Technical Analysis of Stock Trends (1948), and Thomas Bulkowski later catalogued rectangle tops and bottoms in Encyclopedia of Chart Patterns (2nd edition, 2005). StockCharts ChartSchool’s rectangle page sums up the modern view: the pattern is neutral, the break should count only on a close, and the target comes from the height of the box.

Drawn fromtwo tops and two bottoms at matching prices
Directionnone until a candle closes outside
Targetthe box height, added past the break

How do you spot a real rectangle?

Look for two tops at about the same price and two bottoms at about the same price, with price turning at each one. Two touches on one side and one on the other is not a rectangle yet. It’s a range that hasn’t proved itself.

  1. Find the move that came before. A rectangle is a pause in something.
  2. Mark the highs where price turned down. You need at least two, close together in price.
  3. Mark the lows where price turned up. Again, at least two.
  4. Draw a horizontal line through the tops and another through the bottoms. That’s your box.

Price rises, then moves sideways; two tops and two bottoms are circled and a shaded box is drawn between lines labelled Top and Bottom

Don’t expect the touches to be exact. Wicks will poke a little past the lines. What you want is price turning near the same level more than once, not a perfect ruler line.

People often confuse it with a Darvas box, which also looks like a rectangle. The Darvas box only forms after a fresh high and is traded upward. A rectangle can form after a fall too, and can break either way.

Should you trade inside the box or wait for the breakout?

It depends on how tall the box is. Inside the box, you buy near the bottom and sell near the top, so the trade only pays if the height of the box is several times your stop distance. In a narrow box that math fails, and waiting for the break is the better choice.

Same box, two trade plans. Compare them row by row.

Read the two columns side by side. The inside trade has a tight stop under the bottom, but its target is capped by the top of the box. The breakout trade gives up that tight stop in exchange for room to run.

Where this costs youBuying the middle of the box. You get the wide stop of a breakout trade and the small target of a range trade at the same time.

In my view, most traders do better picking one plan per box before price gets near either edge. Deciding halfway through a candle is how people end up buying the top of the range.

How do you trade the rectangle breakout?

Wait for a candle to close above the top, then buy that close. Put the stop in the middle of the box and set the target one box height above the top. For a break below the bottom, flip every step and sell.

The close above the top is the entry. The box height sets the target.

Watch the order in that clip. The box comes first, then the close, and only then the trade levels. Here’s the plan written out:

  • Entry: the close of the first candle that ends above the top of the box.
  • Stop: the middle of the box. If price gets back there, the break has failed.
  • Target: the height of the box, added to the top. ChartSchool calls this the measured move.

Why the middle and not below the bottom? A stop under the bottom survives more noise, but it roughly doubles your risk and halves your position. If you want it anyway, fine: size down using the position sizing routine and check the risk reward ratio against the measured target before you click.

Quick testMeasure the box height with your chart's ruler before the break. If one box height above the top is less than the distance from entry to the middle of the box, skip the trade.
RelicusRoad Pro
Have you been trading for a while but have never made consistent profits or are you new to FOREX trading and want to get a head start? Try RelicusRoad and you'll never look back.
Get RelicusRoad Pro

What happens when the breakout fails?

A close back inside the box means the break failed, and you should be out. A wick that dips in and recovers is normal. A full candle body closing below the top, followed by more selling toward the middle, is the market telling you the buyers didn’t have enough.

The edges of a rectangle are obvious lines that many traders watch, so a break through them can fail and reverse hard. That move back through the box can be sharp, and some traders trade that reversal on purpose; the failed breakout strategy covers that setup. For the breakout buyer, the rule is simpler: respect the stop, and don’t buy the same box a second time on the next poke above the top unless it closes there again.

How does a rectangle compare with a triangle or a flag?

All three are pauses, but they say different things. A rectangle has flat edges and no lean. A triangle squeezes into a point. A flag slopes against the move before it and usually lasts only a short time.

RectangleTriangleFlag
ShapeFlat top, flat bottomLines that meet at a pointShort channel sloping against the trend
Direction before the breakNoneDepends on the typeLeans toward the earlier trend
EntryClose outside the boxClose outside the linesClose outside the channel
Target ideaBox height past the breakWidest part of the triangleLength of the move before the flag
Can you trade inside it?Yes, if the box is tallRarely, it keeps narrowingNo, it is too short
Shape
Rectangle
Flat top, flat bottom
Triangle
Lines that meet at a point
Flag
Short channel sloping against the trend
Direction before the break
Rectangle
None
Triangle
Depends on the type
Flag
Leans toward the earlier trend
Entry
Rectangle
Close outside the box
Triangle
Close outside the lines
Flag
Close outside the channel
Target idea
Rectangle
Box height past the break
Triangle
Widest part of the triangle
Flag
Length of the move before the flag
Can you trade inside it?
Rectangle
Yes, if the box is tall
Triangle
Rarely, it keeps narrowing
Flag
No, it is too short

The flat edges are what make the rectangle useful: you can trade inside it, which you can’t really do with the others. The triangle chart pattern guide covers the squeezing version and its targets.

Where does RelicusRoad Pro fit?

The hardest part of a rectangle is being honest about the top and bottom. RelicusRoad Pro includes the Support Resistance tool, which builds zones from swing points and grades each one Verified, Weak or Untested from its recent tests. That gives you a second opinion on whether your box edges have really been tested twice, before you draw anything by hand.

It won’t pick the direction for you. The close outside the box still decides, and the stop still goes where the idea is wrong.

Frequently asked questions

What is a rectangle pattern in trading? Sideways price boxed in by a flat top and a flat bottom. Price reaches the same ceiling at least twice and the same floor at least twice, until one side wins and price closes outside the box.

Is a rectangle pattern bullish or bearish? Neither on its own. After a rise it often breaks up and after a fall it often breaks down, but that is only a tendency. StockCharts ChartSchool treats it as neutral until a close outside the box.

How do you set a target for a rectangle breakout? Measure the box from bottom to top and add that height to the top for an upside break, or subtract it from the bottom for a downside break. It’s a first target, not a promise.

Where should the stop go on a rectangle breakout? This post uses the middle of the box. A stop below the bottom handles more noise but makes the risk about twice as large, so trade a smaller size.

How is a rectangle different from a Darvas box? A Darvas box forms only after a new high and is traded upward. A rectangle can form after a rise or a fall, can break either way, and needs two tests of both edges.


Find the last sideways stretch on your chart, count the touches on each edge, and decide now whether you’d trade inside it or wait for the close outside. To check your box edges against graded zones, see RelicusRoad Pro.

Written for RelicusRoad by RelicusDigital.com.

Share:
Price Action & Levels

Keep going on this topic

Start with the main guide

Support and Resistance Mastery: Zones, Breaks and Retests

Master support and resistance zones with repeatable drawing rules, breakout and retest confirmation, invalidation, position sizing and common mistakes.

Tools to try

Single RelicusRoad indicators for MT4 and MT5, each one standalone.

All tools