ENTRIQ|Lab
Try ENTRIQ
StrategyLAYER 1

How to Draw Range Boundaries|Backtest Criteria

Where you draw the upper and lower boundaries of a range changes whether your range trades work out. This article explains how to draw the lines and how to separate a bounce from a breakout, with a step-by-step procedure for backtesting your criteria using ENTRIQ's chart replay.

How to Draw Range Boundaries|Backtesting Your Criteria for Trading the Range Back and Forth

"I thought it was a range, sold at the upper boundary, and then it just broke out to the upside." Anyone who has traded a range (a box range) back and forth—that is, sold at the upper boundary and bought at the lower boundary as a counter-trend play—has probably had this experience. The range method is often described simply as "sell at the top, buy at the bottom," but once you actually try it, the result changes completely depending on where you draw those upper and lower boundaries.

Where to draw a single line is more open to interpretation than it looks. In this article, we neutrally organize how to draw the upper and lower boundaries of a range, how far to trust the lines you draw, and how to separate a range "breakout" from a bounce—and we walk through the procedure for backtesting your own criteria with ENTRIQ's chart replay.

This article is a detailed companion to the overview article Range Trading Methods: Judging the Upper and Lower Boundaries and How to Backtest, which covers the basics of the range method itself. If this is your first time working with the range method, reading the overview article first and then coming back here will make the flow easier to follow.

First, the conclusion: think of the upper and lower boundaries as a "zone (band)," not a "point"

Let me set out just one guiding idea to carry through this article.

The upper and lower boundaries of a range are easier to work with when you view them not as a single exact line (a point) but as a band (zone) with a certain amount of width. Price does not reverse cleanly at the same single unit every time—it stops a little short of the line, or turns back after slightly overshooting it.

If you decide to "sell exactly at the upper boundary," you will panic that it "broke out" the moment price slightly exceeds the line, or you will miss the entry when price reverses just short of it. If instead you view the upper and lower boundaries as a band and think "stay alert when price enters this band" and "judge it a breakout when price clearly exceeds and settles beyond the band," it becomes easier to separate range round-trips from a breakout. Keep this distinction in mind as you read on.

Five perspectives for drawing a range's upper and lower boundaries

Where to draw the upper and lower boundaries differs from person to person. The following are neutral guidelines, not "the correct answer."

PerspectiveIdeaCaution
Number of bouncesThe more times price has reversed at the upper or lower boundary, the more people see that band as being watchedMore times does not equal "it will stop again next time." A band is often tested repeatedly right before it breaks
Wick or bodyWhether you take the reversal point at the tip of the wick or at the candle's closing bodyThe band's position shifts between the wick tip and the body. Fix which one you use
Band widthHow wide a band (zone) you use for the upper and lower boundariesA wider band means fewer round-trips but more safety; a narrower band means more round-trips but also more fakeouts
Range periodWhere you consider one range to begin and endThe more finely you slice it, the more ranges appear, but shallow ones that break out quickly get mixed in
Position on the higher timeframeWhere that range sits on the higher timeframe (mid-trend, or at a top/bottom)Many people see a range mid-trend as more likely to break out in the trend's direction

Let's dig into each a little.

Number of bounces: more is more watched, but it can also be a sign of an impending break

When price reverses many times at the upper or lower boundary, that band can be considered to be watched by many participants. The more it bounces—three times rather than two, four rather than three—the more it becomes material for judging "this band works."

But caution is needed. A band that has been tested many times has accumulated that many trades, which can also be a sign that it will finally break (break out). Rather than "many bounces = it will definitely stop," it is safer to hold both sides: "it is being watched, but the odds of an eventual breakout are also rising."

Wick or body: fix which one you draw with

When you draw a range's lines, the line's position changes depending on whether you take the reversal point at the candle's wick tip or at the close (body). Drawing at the wick tip makes the range wider; drawing at the body makes it narrower.

Neither is correct, but it is important to fix on one or the other within your own approach. If you conveniently switch—the wick sometimes, the body other times—you will not be able to tell "what worked" even after backtesting. Only once you fix your drawing method can you compare backtesting results.

Band width: the trade-off between round-trip count and safety

If you set the upper and lower boundaries as a narrow band and make contact with that band your entry condition, the number of times the condition is met tends to increase. However, you will also pick up more cases where price breaks straight through without reversing short of the line, so fakeouts increase.

Conversely, if you use a wide band, you need to also define an entry condition rather than entering just because price entered the band—for example, confirming that price stalls within the band or shows signs of reversing. Stricter conditions tend to reduce the number of times you get caught in fakeouts, but they also reduce the number of round-trips, and depending on where you enter, the profit range can be smaller too. Which one suits you is an approach that is easier to handle by trying and comparing several widths in backtesting.

Range period: separating short-term stalls from continuous back-and-forth

Whether you regard a state where just a few highs and lows have lined up as a range, or regard only a state where the price has traveled between the upper and lower boundaries over a certain period as a range, changes which situations you detect. The more finely you slice the period, the more range candidates appear, but you are also more likely to include temporary stalls mid-trend. In backtesting, fix "how many bars a state must continue to count as a range" and compare.

Position on the higher timeframe: check not just the range but the structure outside it

Even for a range of the same shape, its meaning can differ between one that sits mid-trend on the higher timeframe and one that comes after a long rise or fall. If the higher timeframe is still updating its highs and lows, the range may be a temporary stall in the trend's direction. Record and test not just the shape within the range but also where it sits on the higher timeframe.

The trade-off: go for the round-trips, or prepare for the breakout

The difficulty of the range method comes down to one trade-off: if you aggressively go for round-trips at the upper and lower boundaries, you rack up the count but are more likely to get caught in a breakout; if you enter cautiously, wary of a breakout, you miss some of the round-trips.

  • Enter counter-trend immediately when price reaches the upper/lower boundary band → many round-trips, but if it breaks out you take a large loss straight through
  • Enter after confirming a sign of reversal (a stalling move) at the band → less likely to get caught in a breakout, but your entry is later

The range method has a structural weakness: while the profit you can take on a round-trip is limited to the width from the upper to the lower boundary, without an exit criterion the loss when it breaks out tends to balloon. Even if you stack up many small profits, you can easily lose them in a single large breakout. That is exactly why an exit criterion for when you recognize a breakout matters even more than the round-trip trading itself.

Separating it from a range "breakout": an idea that ties directly to your stop-loss

The most important thing in the range method is to decide, before you enter, the criterion by which you judge "this is no longer a round-trip, it's a breakout" and exit.

After you sell at the upper boundary and price exceeds it, there is both the "fakeout breakout" that quickly comes back and the "genuine breakout" that shifts straight into an uptrend. There is no way to tell these two apart perfectly. That is exactly why you need to put into words in advance the point at which your scenario has broken down—for example, "if price closes above the upper boundary band and does not return inside the band afterward, regard the round-trip scenario as broken and exit."

What you want to avoid here is holding onto price that is breaking out, hoping "it should come back again." If you sold at the upper boundary yet price has clearly exceeded and settled beyond it, that means the range you assumed has ended. Rather than holding on out of hope, exit actively based on your criterion—this is the lifeline for limiting losses in the range method. For judging the range breakout itself, see Breakout Fakeouts: Judging the Genuine Break Through Backtesting.

Why verify with backtesting

Having read this far, you have probably felt that "where to draw the line," "how wide a band to use," and "from where to regard it as a breakout" differ by person and by market. These cannot be decided by the generalities in books or online. Only by testing them yourself, many times, on past charts do you begin to see the shape that suits you.

The range method in particular is one where backtesting has high value, because the result changes with a single choice of how to draw the line. If you suddenly try it live, you tend to take losses on both the round-trips and the breakouts while your drawing method is still unsettled. With backtesting you can reproduce the same range situation as many times as you like, and because you use virtual funds, no real money is at stake, so you can try it while changing how you draw the lines.

ENTRIQ's chart replay lets you rewind past charts and advance the candles one at a time, reproducing range judgments from a state of "not knowing what comes next." Repeatedly deciding "do I go counter-trend here, or stand aside wary of a breakout?" when you approach the upper boundary—without being able to see the future—makes for practice close to the real thing. For the basics, see What Is Chart Replay? How to Practice Stock Trading on Past Charts.

Make entry and exit a rule as a set

In the range method, always decide not just "where you go for the round-trips" but also "what has to happen for you to recognize a breakout and exit," as a set.

  • Entry: the moment price reaches the upper/lower boundary band, or after confirming a sign of reversal at the band (it stalls, or makes a small move in the opposite direction)
  • Exit (stop-loss): the point where price closes clearly above/below the upper/lower boundary band and settles / a fixed adverse move
  • Exit (take-profit): where price reaches the opposite band / a conservative point short of the round-trip width
  • Stand-aside conditions: when the range period is short and the number of bounces is few / when the higher timeframe is in a strong trend and prone to breaking out

Especially in the range method, firming up the exit criterion (the definition of a breakout) first is what determines the safety of your range round-trips.

Examples for the strategy rule field (2 patterns)

ENTRIQ has a "strategy rule" field where you record your method in words. Here are two model patterns for how to write up the range method. The figures below are merely examples of how to write, and do not guarantee effectiveness or profit.

Pattern 1: Discretionary (defining the situation in words)

Environment read: Confirm that recently price has reversed at least three times each from the upper and lower boundaries, forming a clear range. Stand aside when the higher timeframe is in a strong trend.

Entry: Enter long after price reaches the lower boundary band and a stalling move—such as a lower wick or a small bounce—appears there (reverse for the upper boundary). Do not jump in the instant price touches the band.

Stop-loss: Exit at the point where the round-trip scenario breaks down—when price closes clearly below the lower boundary band.

Exit: Plan to take profit where price reaches the opposite (upper) band.

Stand-aside conditions: When the number of bounces is few / when the higher timeframe is in a strong trend.

Pattern 2: Rules-based (spelling out conditions with indicators and numbers)

Entry conditions: Within the last 60 bars, the upper and lower boundaries have each been touched at least three times, AND price reaches the lower boundary band (lower boundary ±0.5%), AND a bullish candle with a lower wick is confirmed.

Filter: The range width (upper boundary − lower boundary) is at least twice the average bar range (high − low) of the last 20 candles (on the premise of securing round-trip profit range).

Stop-loss: Exit if price closes 1% below the lower boundary.

Take-profit: Take profit just short of the upper boundary band (upper boundary − 0.3%).

Invalidation (stand aside): When the higher timeframe is updating its recent high/low (trend continuation), do not enter even if it looks like a range.

The Discretionary type is one that "defines the situation in words," and the Rules-based type is one that "spells out conditions in numbers." Neither is superior; choose whichever you can reproduce more easily, whichever is easier to review in backtesting. Because ranges are prone to subjectivity in how the lines are drawn, spelling out the band width and touch count with the Rules-based type raises the reproducibility of your backtesting.

Backtest and record

Once you have set your rules, try past range situations many times with ENTRIQ's chart replay and record the results. Tagging each trade with a strategy tag (e.g., "range, lower-boundary bounce confirmed") lets you automatically aggregate win rate, average risk-reward, profit and loss, and more across only the trades of the same method. How to keep records is covered in detail in How to Keep a Trade Journal: Reviewing with Strategy Tags.

One caution here. While your sample size is small, do not take the aggregated figures at face value. A win rate produced from 5 or 10 backtests is likely a matter of chance and is not enough to speak to whether a method is good or bad. That is exactly why it is meaningful to rack up the number of attempts in backtesting, where no real money is at stake.

グラフを表示できません: bar: data は配列である必要があります

*The chart above is hypothetical data for illustration showing that "the tendency of results can change with how you draw the lines and how you apply confirmation," and does not represent actual performance or effectiveness. Gather your own figures through your own backtesting.

Once your backtest data accumulates, you can also organize the tendencies with ENTRIQ's AI analysis. AI analysis is not a buy/sell signal or a prediction; it is a feature that uses your past trade data and notes as material to organize "observed tendencies" in words. For example, it can help organize patterns that are hard to notice on your own—such as "trades entered without confirming a stalling move at the band had a higher rate of being stopped out on a breakout"—within the range of the recorded data. For details, see Reviewing Trades with AI Analysis: Organizing Your Own Tendencies from Figures and Notes.

Four common mistakes

Here are four points where people tend to stumble when backtesting this approach.

1. Changing how you draw the line each time

If you switch your drawing method—the wick sometimes, the body other times—you will not be able to tell what improved your results. Only once you fix wick vs. body and how you set the band width does your backtesting become something you can compare.

2. Going for round-trips without deciding an exit criterion for breakouts

A range has a cap on round-trip profit, while without an exit criterion the loss when it breaks out tends to balloon. If you repeat round-trip trades without deciding an exit criterion, you lose your accumulated profit in a single breakout. Always put "from where you regard it as a breakout" into words before you enter.

3. Jumping in every time the instant price touches the band

If you mechanically go counter-trend exactly at the upper or lower boundary, you pick up every situation that breaks straight through. The purpose of backtesting is to test a condition of entering after confirming a stalling move at the band, and to find the way of waiting that suits you.

4. Overlooking a range within a trend

A small range while the higher timeframe is in a strong trend tends to break out in the trend's direction. If you look only at the range and go counter-trend without checking the higher timeframe, you get caught in a breakout in the trend's direction.

Frequently asked questions (FAQ)

Q. Should I draw the range's upper and lower boundaries with the wick or the body?

A. Neither is the correct answer. Drawing at the wick tip makes the range wider; drawing at the close (body) makes it narrower. What matters is fixing on one or the other within your own approach. If you change your drawing method each time, you will not be able to compare backtesting results. First decide on one, then confirm through backtesting which is easier to handle.

Q. How many bounces before I can judge it a "range"?

A. There is no fixed number. Generally, many people see a boundary as being watched once price has reversed at least two or three times each from the upper and lower boundaries, but more times does not equal "it will stop again next time." If anything, a band tested many times can be a sign of an impending break. Treat the number of bounces as one guideline, judge it together with the position on the higher timeframe and the band width, and confirm your own criteria through backtesting.

Q. I sold at the upper boundary and it broke out. What should I have done?

A. With this approach, "breakouts" are unavoidable. What matters is deciding in advance a criterion by which you can exit at the point you recognize a breakout. For example, put the point where your scenario breaks down into words before you enter, such as "exit if price closes clearly above the upper boundary band and settles." Rather than holding on out of hope, exit actively based on your criterion—that is the iron rule of the range method.

Q. Can I still trade the range back and forth when the range width is narrow?

A. When the range width is narrow, the profit range you can take on a round-trip is smaller while the breakout risk is unchanged, so risk-reward tends to worsen. In this article's Rules-based example, "range width at least twice the average bar range of the last 20 candles" is used as a filter. Whether to have a criterion for standing aside from narrow ranges is also something you can confirm through backtesting.

Q. How do I tell a range from a trend?

A. The basic view is: if price is traveling between the upper and lower boundaries it is a range, and if it keeps raising (or lowering) its highs and lows it is a trend. However, the boundary is ambiguous, and a temporary range can appear mid-trend. Checking the position on the higher timeframe and keeping in mind that a range mid-trend is prone to breaking out in the trend's direction makes it easier to judge.

Q. Can range round-trips and breakout trades coexist?

A. Using the same range as the subject, trading the range back and forth (counter-trend at the upper and lower boundaries) and the breakout method that aims for the break are continuous with each other. Once price clearly exceeds and settles beyond the upper boundary band, the round-trip scenario is over, and from there you switch to judging the breakout. For judging range breakouts, see Breakout Fakeouts: Judging the Genuine Break Through Backtesting.

Summary

The range method is often described simply as "sell at the top, buy at the bottom," but the real difficulty lies in where you draw the upper and lower boundaries. What determines the safety of trading the range back and forth is capturing the line not as a point but as a band (zone), fixing your drawing method along perspectives such as the number of bounces, wick vs. body, band width, and position on the higher timeframe, and deciding in advance the exit criterion for "from where you regard it as a breakout."

A range has a cap on round-trip profit, while without an exit criterion the loss when it breaks out tends to balloon. That is exactly why the exit criterion matters even more than the round-trip trading itself. Whether these suit you cannot be decided by the generalities in books or online. Testing many times on past charts, recording it—including your failures—and reviewing it: only through this repetition do you find the shape that suits you.

If you want to organize the basics of the range method itself, return to the overview article Range Trading Methods: Judging the Upper and Lower Boundaries and How to Backtest.

ENTRIQ is a stock practice and backtesting tool for individual traders that integrates chart replay, trade journaling, and AI analysis. It is built for the workflow of testing how you draw range lines many times in backtesting rather than live, and distilling it into your own criteria. If you value repeatable practice reps rather than a longer feature list, try the 14-day free trial.


This article does not guarantee the effectiveness or profitability of any specific trading method or rule. The figures and examples shown are samples to illustrate how to write your rules and do not represent actual investment results. All investment decisions and their risks are the sole responsibility of the investor.

Reproduce this validation yourself

With ENTRIQ's chart replay, you can trade through past charts using the same rules.

Start 14-day free trial

Validate your method on past charts

The same validation in this article can be reproduced with your own method. On past charts, do the classics really work?

  • Replay past charts
  • AI feedback on your trades
  • Validate methods with statistics

Related reading

StrategyLAYER 1

Chart Pattern Fakeouts: Spot Failed Patterns and Backtest

A chart pattern only counts once it completes. How to tell a forming pattern from a failed one (a fakeout), and backtest your basis in chart replay.

StrategyLAYER 1

Role Reversal: When Resistance Becomes Support, Backtested

Break above resistance and the line can act as support afterward — role reversal. How to confirm it's real, tell it from a fakeout, and backtest your basis.

StrategyLAYER 1

Strong Support & Resistance|Backtest Line Strength

Once you draw support and resistance lines, you can't tell which ones will actually hold. This article explains how to backtest measures of line strength, such as the number of bounces, using ENTRIQ's chart replay.

StrategyLAYER 1

Don't Catch a Falling Knife: Backtest the Reversal

"It's overextended, so it must bounce" — not necessarily. How to tell a reversal from a falling knife, and backtest your own rules in ENTRIQ's chart replay.

Try in ENTRIQ

Reproduce this validation with your own method

Replay past charts and discover your method's actual win rate.

Start 14-day free trial