Skip to content
Script type
Indicator
Source code
Open-source

Auto Range Detector [QuantAlgo]

Automatically boxes consolidation ranges and separates real breakouts from failed breaks.

4.4 / 5.0 Overall

  • Effectiveness 4.6
  • Originality 4.0
  • Clarity 4.1
  • Flexibility 4.8
  • Reliability 4.4

Difficulty Intermediate

No.VOW-000046

About this rating Auto Range Detector is an analysis and visualization indicator that shows consolidation as a box on the chart. Flexibility lifts the rating the most: everything from the detection tests to how a box ends can be dialed in, and the ATR-based design works on any symbol or timeframe. Effectiveness is also high, since detection, the break, and the failed break can be followed in one flow. Originality sits where it does because boxing a range is a widely used form of display, though counting rotations and the way Deviations are merged bring a distinct angle. It shines when you check the higher timeframe for consolidation and use the box edges as reference levels for entries and exits.
About the difficulty All you see on the chart is a box, dotted lines, and two kinds of markers, so reading it is not hard in itself. But unless you understand that Breakout and Deviation markers use opposite color logic, that a Breakout can be withdrawn after the fact, and that the left edge of the box is drawn back into the past, a historical chart will look better than the indicator really performed live. There are also more than 30 settings, and tuning the detection tests yourself takes some comfort with ATR and percentiles. A beginner can load the defaults and simply watch the boxes, but getting a real feel for its character and using it well calls for intermediate-level knowledge.

Overall 4.4/ 5.0

About our rating standards

  • Effectiveness 4.6 It follows a consolidation from detection through the break and the failed break as one continuous box. Nearly everything you need to read a range is here.
  • Originality 4.0 Boxing a range is a familiar idea, but counting rotations to separate consolidation from a reversal and merging failed breaks back into the original box are clear refinements.
  • Clarity 4.1 Color shows the state at a glance and the light shading stays out of the way of price. Where boxes anchored back into the past overlap, the tag text gets harder to read.
  • Flexibility 4.8 The five detection tests, boundary placement, and break confirmation can each be tuned separately. Because it is ATR-based, the same settings carry across symbols and timeframes.
  • Reliability 4.4 On default settings it evaluates after the bar closes and behaves consistently. Withdrawn Breakouts and the backward-anchored left edge are both stated in the settings tooltips.
Repainting
Depends on settings
  1. Live barChanges
  2. On closeDepends
  3. HistoryFixed
When a range is detected, the box's left edge is drawn back into past bars, and with Merge Deviations on, a Breakout marker that already printed on a confirmed bar can be withdrawn for up to 10 bars and replaced by a Deviation marker on an earlier bar.
Best timeframes
  • Lower TFs≤15m
  • Mid TFs30m–4H
  • Higher TFs1D+
Tested on BTCUSDT (5m, 1H, 1D)
Alerts
5 conditions
Buy/sell signals
Yes
Market conditions
Ranging
Display
Overlay
Chart elements
BoxesLinesLabels
Base indicator
ATRLinear Regression
Trading style
Swing TradingDay TradingPosition Trading

Our review of this indicator

SUPPORT & RESISTANCEBREAKOUT

Don’t Get Whipsawed by Range Breakout Fakeouts: Testing an Indicator That Judges Consolidation by 5 Conditions

Don’t Get Whipsawed by Range Breakout Fakeouts: Testing an Indicator That Judges Consolidation by 5 Conditions

Diagram gallery 7

Article Summary
What does this indicator do?
Bottom line

Auto Range Detector is a TradingView range detection indicator that automatically boxes consolidations passing five tests (compression, rotation, touches, drift, and containment), then marks the breakout bar with Breakout and failed breaks that return inside with Deviation.

Tell me more
Key points
  • Auto Range Detector automatically finds stretches where price rotates between two boundaries and draws them as a box.
  • It checks the last 20, 40, and 60 bars, and the longest window that passes every test becomes the range.
  • A live box is gray. It turns green on an upside break or red on a downside break, with a Breakout marker.
  • An equilibrium line and dotted 25% and 75% lines inside the box show where price sits within the range.
  • If a bar closes back inside the box within 10 bars of a break, the Breakout is withdrawn and replaced by a Deviation marker.
  • Detection uses ATR and a comparison with past price action, so the same settings work across symbols and timeframes.
  • Default settings wait for the bar to close, but the left edge of the box is drawn back into the past once a range is detected.
  • When playing bounces off the box edges, adding a momentum indicator such as RSI makes it easier to build a case.

Auto Range Detector: Stop Drawing Range Boxes by Hand

If you find yourself redrawing horizontal lines and rectangles over every sideways high and low each time you open a chart, the TradingView indicator “Auto Range Detector” is built for you. It automatically finds stretches where price is rotating between two boundaries, draws the range as a box, and marks both the bar that breaks out and the spot where a failed break snapped back inside.

There are plenty of range-box tools out there, but what makes “Auto Range Detector” interesting is that it splits the question “what actually counts as a range?” into five separate tests, each of which you can tune. A tight price band alone is not enough. Price has to rotate back and forth repeatedly, tag both edges more than once, stay flat, and keep most of its closes inside. Only a stretch that passes every test becomes a box.

Auto Range Detector on a TradingView Bitcoin 1-hour chart. A live range is drawn as a gray box, an upside break turns it green, and a downside break turns it red.
Auto Range Detector on a TradingView Bitcoin 1-hour chart. A live range is drawn as a gray box, an upside break turns it green, and a downside break turns it red.

I loaded it on Bitcoin 5-minute, 1-hour, and daily charts, and without touching a single setting the boxes landed very close to the areas I would have eyeballed as chop. Honestly, I was a little surprised that the output did not change dramatically from one timeframe to the next.

What You See on the Chart: A Box, Dotted Lines, a Tag, and Two Kinds of Markers

“Auto Range Detector” does not draw much on the chart. Let’s start with the figure to see what a live range looks like.

How to Read the Lines and Tag on a Range Box

A range found by "Auto Range Detector" is drawn as a gray box behind the price action.

How to Read the Lines and Tag on a Range Box① The top and bottom border mark the range boundaries ② Middle dotted line: equilibrium Faint lines: 25% and 75% ③ Tag: state, bars, heightRANGE 46 BARS 20.82%⤵ Deviation▼ BreakoutRANGE 23 BARS 7.43%The top and bottom bordermark the range boundariesMiddle dotted line: equilibriumFaint lines: 25% and 75%Tag: state, bars, height

Vowars DE ver.3.12.30

The shading is darker near the boundaries and lighter toward the middle. The numbers on the tag are the bars from the left edge to the current bar and the box height as a percentage of the bottom price.

The border in Figure ① is the top and bottom of the range. By default it sits at a level that trims the most extreme few highs and lows, so a long wick can poke slightly outside the border. That is not a bug. It is by design, so that a single stray wick does not get to define the size of the box.

Figure ② shows the three dotted lines inside the box. The darker one is the equilibrium line, right at the midpoint, and the two fainter ones sit at 25% and 75% of the range. Even when price is nowhere near an edge, you can tell at a glance where you are inside the range, so these three lines are what I lean on the most.

The tag in Figure ③ shows three things: the state, how many bars the box has lasted, and its height. The height is the box height divided by the bottom price, shown as a percentage. When I tested the 1-hour chart, the live box read “RANGE 144 BARS 2.15%”. That is 144 bars, or six full days, stuck inside a band of just over 2%, and the numbers tell you so directly.

The Box Color Tells You How the Range Ended

The box changes color with its state. Once you know what each color means, you can scan back through past ranges and see at a glance which way each one resolved.

Box colorStateMarker shown
GrayRange is still liveNone
GreenEnded with an upside break▲ Breakout below the bar
RedEnded with a downside break▼ Breakout above the bar

One thing to watch is the color of the Deviation marker. A dip below the range that gets reclaimed is marked in green, and a poke above the range that fails is marked in red. The color follows the logic that a failed breakdown is bullish and a failed breakout is bearish, so it looks like the opposite of the Breakout colors. I misread it myself at first.

A Dashed Border and FORMING Mean “Not Confirmed Yet”

An Unconfirmed Range Is Drawn With a Dashed Border

Until the box spans as many bars as Minimum Range Bars, it is treated as a provisional range.

An Unconfirmed Range Is Drawn With a Dashed Border① Dashed border means the range is provisional ② Tag starts with FORMINGRANGE 52 BARS 25.61%▼ BreakoutFORMING 23 BARS 7.43%Dashed border meansthe range is provisionalTag starts with FORMING

Vowars DE ver.3.12.30

This is how it looks with Minimum Range Bars raised to 40. The box spans 23 bars, so it is not confirmed yet. If price breaks a boundary in this state, the box disappears without leaving a marker.

A freshly detected range has a dashed border, as in Figure ①, and its tag starts with FORMING, as in Figure ②. Once the box spans as many bars as Minimum Range Bars, the border turns solid and the tag switches to RANGE.

If price breaks a boundary while the box is still provisional, the box simply disappears from the chart without leaving a marker. Only ranges that held for a while stay on the chart.

You Will Rarely See FORMING on Default Settings

The default for Minimum Range Bars is 10, but the shortest window used for detection is 20 bars. So on default settings a box counts as confirmed on the very bar it appears, and you will almost never see the dashed border. The figure above was captured with this value raised to 40. If you want a provisional stage, set it above 20.

What Kind of Price Action Counts as a “Range”?

Every time a bar closes, “Auto Range Detector” checks three windows: the last 20, 40, and 60 bars. For each window it places a provisional top and bottom, then checks whether all five of the following tests pass.

TestWhat it measuresThreshold on default settings
CompressionHow tight the window is compared with the same symbol and timeframe in the pastWithin the tightest 40% of past readings
RotationHow many times the close crossed the equilibrium lineAt least 4 crosses in 20 bars, 7 in 40, 11 in 60
Touches on both edgesHow many bars reached close to the top and the bottomAt least 2 bars on each side
DriftHow much the regression line tilts across the windowTilt covers no more than 45% of the box height
ContainmentShare of bars that closed between the top and the bottom70% or more

When more than one window passes, the indicator uses the longest one. That is why a single configuration picks up both a small 20-bar coil and a big 60-bar consolidation.

The part I personally think is clever is the rotation test. A V-shaped reversal can span the same distance as a range, so width alone cannot tell the two apart. But a V only crosses its midpoint about twice. Counting the back-and-forth is what separates real consolidation from a plain reversal.

Why It Feels the Same on Any Symbol or Timeframe

Compression is not judged against a fixed number like “within X dollars”. The band height is normalized by ATR and then ranked against that symbol’s own history on that timeframe. The touch tolerance and the distance required for a break are ATR multiples as well.

So whether it is Bitcoin on the 5-minute or the daily, or gold or an equity index, you can use it as is without swapping numbers. When I switched to the daily chart, boxes 10–20% tall ran for 77 and 78 bars, and I could see they were drawn by the same logic as the roughly 0.5% boxes on the 5-minute chart.

Auto Range Detector on a Bitcoin daily chart. Large ranges 10–20% tall are detected as boxes using the same criteria as on lower timeframes.
Auto Range Detector on a Bitcoin daily chart. Large ranges 10–20% tall are detected as boxes using the same criteria as on lower timeframes.
Bars Needed Before Anything Shows Up

The compression ranking needs ATR Length bars of history (200 by default). No boxes appear for roughly the first 200 bars of the chart. On newly listed symbols, or on charts with few bars such as the monthly, boxes can take a long time to show up. In that case, shortening ATR Length lets detection start sooner.

Breakout Marks the Moment a Range Ends

On a Downside Break the Box Turns Red and Prints Breakout

When a bar closes beyond a confirmed range, the box closes on that bar and is recolored for the direction of the break.

On a Downside Break the Box Turns Red and Prints Breakout① Close confirmed below the bottom ② Box and border turn red ③ Count excludes the breakout bar and stays at 23RANGE 46 BARS 20.82%⤵ Deviation▼ BreakoutRANGE 23 BARS 7.43%▼ BreakoutClose confirmed below the bottomBox and border turn redCount excludes the breakout barand stays at 23

Vowars DE ver.3.12.30

On default settings, a break is a bar that closes more than 0.15 ATR beyond the boundary. On an upside break the box turns green and ▲ Breakout prints below the bar.

When price breaks a confirmed range, the box closes on that bar. Figure ① is the breakout bar. On default settings, a wick through the boundary is not enough. The bar has to close beyond the boundary by more than 0.15 ATR before it counts as a Breakout.

At that moment the box and border change color, as in Figure ②, and a ▼ prints above the bar on a downside break or a ▲ below the bar on an upside break. The marker sits on the opposite side of the bar from the break direction, presumably so it does not cover the price action that follows.

A small detail: the bar count on the tag in Figure ③ does not include the breakout bar. The box itself extends to the breakout bar, so the number can be off by one from what you get by measuring the box width with TradingView’s measure tool.

Wicks that poke just outside a boundary are handled by Absorb Overshoot. If the bar closes inside the box and the excursion is within 0.25 ATR, the box stretches out to the tip of the wick. That spares you the annoyance of a box closing on every little wick and a new one opening a few ticks away.

Failed Breaks That Come Back Inside Are Kept as Deviations

The biggest headache in range trading is the fakeout: price breaks, then comes right back. “Auto Range Detector” treats this as its own case.

A Break That Returns Inside the Box Becomes a Deviation

If price closes back inside the box within 10 bars of breaking out, the Breakout is withdrawn and the range continues.

A Break That Returns Inside the Box Becomes a Deviation① Close below the bottom ② Marker at the low of the excursion ③ Close back inside the box, range revivedRANGE 49 BARS 10.09%▼ BreakoutRANGE 23 BARS 4.52%▲ BreakoutRANGE 21 BARS 6.46%▲ BreakoutRANGE 35 BARS 3.62%⤴ DeviationClose below the bottomMarker at the low of the excursionClose back inside the box,range revived

Vowars DE ver.3.12.30

The Deviation marker is placed at the lowest low of the excursion (the highest high on an upside break), not on the bar where price returned. The ▼ Breakout that printed on bar ① is gone by bar ③.

At Figure ① the bar closes below the bottom and a ▼ Breakout prints. But when the bar at Figure ③ closes back inside the box, the Breakout marker is withdrawn, the box turns gray again, and it carries on from its original left edge. In its place, the Deviation marker in Figure ② is printed at the lowest low of the excursion.

How long it waits for price to return is set by Deviation Window, which defaults to 10 bars. If price does not come back within 10 bars, the break is confirmed as real and the box stays red.

What you end up with on the chart is one long range with a single fakeout inside it. I found that far easier to read than a box that gets cut on every break, leaving a pile of near-identical boxes over the same price zone. On the 5-minute chart these Deviations print quite often, which shows just how much more price pokes outside the boundaries on lower timeframes.

Auto Range Detector on a Bitcoin 5-minute chart. Deviation markers line up where price briefly left the range and came back.
Auto Range Detector on a Bitcoin 5-minute chart. Deviation markers line up where price briefly left the range and came back.
A Breakout Marker Can Disappear Later

While Merge Deviations is on, a Breakout marker can still be withdrawn for up to 10 bars after it prints. The Breakouts left on a historical chart are only the ones that never came back, so the indicator tends to look better in hindsight than it did live. If you trade by jumping in on the breakout bar, keep this firmly in mind.

When You Want Breaks to Be Final

With Merge Deviations Off, a Break Is Final on the Spot

On the same price action, turning Merge Deviations off means the break is not withdrawn.

With Merge Deviations Off, a Break Is Final on the Spot① Box closes on the breakout bar ② Breakout stays even if price comes back laterRANGE 49 BARS 10.09%▼ BreakoutRANGE 23 BARS 4.52%▲ BreakoutRANGE 21 BARS 6.46%▲ BreakoutRANGE 22 BARS 3.62%▼ BreakoutBox closes on the breakout barBreakout stays even ifprice comes back later

Vowars DE ver.3.12.30

The box closes red at 22 bars and the ▼ Breakout stays. Even if price later returns to the same zone, this box does not reopen. A separate new box forms if the conditions are met.

With Merge Deviations turned off, the box closes on the bar at Figure ① and the Breakout stays put, as in Figure ②. Even if price comes back afterward, the box does not reopen. Markers never vanish, but in exchange the box gets chopped up on every fakeout. Off suits traders who want to test breakouts mechanically, and on suits those who want the full picture of the range.

How to Use It in Actual Trading

“Auto Range Detector” is a tool that lays out whether you are inside a range, out of it, or looking at a failed break. Here is the order I would use it in.

1 Check the Higher Timeframe: Are You Inside a Box?

First, open the 1-hour or 4-hour chart and see whether a gray box is showing. If it is, go easy on trend-following trades on the lower timeframes. That alone cuts down a lot of the situations where you trade with momentum in the middle of chop and get whipsawed. The higher the bar count on the tag, the longer the range has lasted, which also makes the eventual break more worth watching.

2 Use the Box Edges and the 25% / 75% Lines as Fade Levels

If you trade inside the range, the edges of the box are where to look. The classic playbook is to sell when upper wicks stack up near the top and buy when lower wicks stack up near the bottom, and the box works as a ready-made ruler for that. It is also easy to set targets: take profit at the equilibrium line, or at the 25% or 75% line on the far side if you want to let it run. The standard stop goes just outside the boundary, but on symbols that print a lot of Deviations, check how far past markers reached before deciding how much room to give it.

3 After a Break, Give It 10 Bars to See If It Comes Back

Once a Breakout prints, the decision is whether to chase it right away or wait for a retest. On default settings the break is withdrawn if a bar closes back inside the box within 10 bars, so I find it calmer to use the high or low of the breakout bar as the stop reference and wait for price to retest the boundary from the outside and bounce. If a Deviation marker prints instead, the setup flips: you are now looking for a move away from the failed side, toward the opposite edge of the box.

Where It Fits and Where It Does Not

Its strength is making sense of a market that has lost direction and watching for the break out of it. It works on any timeframe, from day trading to swing trading. Keeping it on the daily or weekly chart for context in position trading is not a bad idea either.

On the other hand, in a market running hard in one direction no window passes the tests, so no box appears. That is correct behavior more than a weakness, and you can read it as information: no box means no consolidation. The box edges can still serve as reference levels for scalpers closing trades in seconds to minutes, but the default settings wait for the bar to close, so do not expect it to be fast as a trigger.

Add RSI to Back Up Bounces at the Edges

“Auto Range Detector” tells you where the edges are, but not how much momentum is left when price gets there. The indicator I found fits best to fill that gap is RSI.

Pairing the Box Bottom With RSI to Gauge the Bounce

An example of reading RSI direction against an "Auto Range Detector" boundary.

Pairing the Box Bottom With RSI to Gauge the Bounce① Dips below the bottom, then returns ② Price makes a lower low ③ RSI makes a higher lowRSI(14)RANGE 54 BARS 10.21%⤴ Deviation▼ BreakoutRANGE 47 BARS 9.73%⤵ Deviation⤵ Deviation▲ BreakoutRANGE 38 BARS 13.61%▼ BreakoutRANGE 50 BARS 12.06%⤴ Deviation⤴ DeviationDips below the bottom, then returnsPrice makes a lower lowRSI makes a higher low

Vowars DE ver.3.12.30

At the second Deviation price makes a marginally lower low, while the RSI low rises from 37.6 to 41.8. This is a way to check a bounce off the boundary from the momentum side.

At Figure ① price dips below the bottom and comes back, printing the first Deviation. Then at Figure ② it makes a marginally lower low, but Figure ③ shows RSI making a higher low. Price is lower while selling pressure is fading: a textbook bullish divergence. When location (the bottom of the box) and momentum (the higher low on RSI) line up, the case for playing the bounce becomes much easier to trust.

A few other tools pair well with it.

  • Volume – Rising volume on the Breakout bar is a clue as to whether the break has follow-through. It is safest to assume a low-volume break is more likely to end up as a Deviation.
  • ADX – If ADX stays low while the box is live and turns up as price breaks, you get a second confirmation of the shift from consolidation to trend.
  • Bollinger Bands – If a squeeze in the bands overlaps the box, a separate calculation is confirming that price is coiling.

Which Settings Are Worth Touching?

The settings come in four groups, and there are a lot of them. You do not need to understand every one to use the indicator, though. I suggest running the defaults for a few days and only adjusting what bothers you: too many boxes, too few, or a left edge you do not like. This section sticks to the settings that make the biggest difference.

Detection / Window Length and Boundary Placement

Parameters
SettingDefaultSuggestedEffect
Scan ScalingBase + 2x + 3xBase + 2x + 3xNumber of windows tested. Base only tests just the base length and limits detection to short ranges
Base Scan Length2015–30Length of the shortest window. Lower values also pick up brief pauses inside a trend, higher values leave only long consolidations
Boundary BasisPercentile bandPercentile bandHow the boundaries are placed. Absolute extremes uses the highest high and lowest low, Body extremes uses candle bodies only
Boundary Percentile9085–95With Percentile band, how much of the wicks gets trimmed. At 100 it matches the highest high and lowest low
Signal TimingBar closeBar closeWhether to wait for the bar to close. Live bar also evaluates the forming bar
ATR Length200200Lookback of the ATR used as the unit of distance. Shorter values make the reference follow recent volatility

Base Scan Length changes the character of the boxes more than anything else. As a guide, use around 15 if you want to catch small consolidations on lower timeframes, and around 30 if you only want the big ones on the daily. Boundary Basis is fine left alone in most cases, but on thin symbols prone to abnormally long wicks, switching to Body extremes makes the box settle onto the cluster of candle bodies.

Structure Filters / Tighten or Loosen the Definition of a Range

Parameters
SettingDefaultSuggestedEffect
Compression Percentile4030–50Threshold for compression. Higher values also box wider consolidations, lower values leave only tight ones
Calibration Lookback500500How much history compression is ranked against. Shorter values adapt faster to a volatility shift
Min Rotation Rate0.180.15–0.25Midline crossings required per bar. Higher values pick up only busy two-sided rotation
Touch DefinitionWick reachesWick reachesWhether a wick reaching the boundary counts as a touch, or only a close
Min Boundary Touches22–3Touches required on each side. Higher values leave only boxes that were defended repeatedly
Touch Tolerance (ATR)0.100.10How close to the boundary a bar must get to count as a touch
Max Drift0.450.30–0.60How much tilt is allowed. Higher values also box sloping channels
Min Containment0.700.70–0.80Share of closes inside the box. Higher values tighten the box and drop windows with too many excursions

If you feel there are too many boxes, start by lowering Compression Percentile to 30. The loose, vaguely sideways areas drop out and only tight consolidations remain. If that is still too many, set Min Boundary Touches to 3. Conversely, on symbols where boxes rarely appear, raising Compression Percentile to 50–60 or loosening Max Drift to around 0.6 should let it pick up gently sloping consolidations too.

Range Behavior / The Left Edge and How a Range Ends

Parameters
SettingDefaultSuggestedEffect
Range AnchoringExtend to containmentExtend to containmentHow the left edge is set. Scan window only draws the box across just the window that was tested
Anchor Lookback300300Maximum number of bars the left edge can walk back
Minimum Range Bars1010 (around 30 if you want a provisional stage)Bars required before the box counts as confirmed
Absorb OvershootOnOnTakes a marginal wick into the box
Overshoot Tolerance (ATR)0.250.25Largest excursion that can be absorbed
Break ConfirmationClose beyondClose beyondConfirms a break on the close. Wick beyond counts a break as soon as a wick crosses
Breakout Buffer (ATR)0.150.15–0.30Distance past the boundary required for a break to count
Merge DeviationsOnDepends on useMerges a break that comes back inside into the original box
Deviation Window105–15Bars to wait for price to return
Cooldown Bars33Wait time after a box ends before the next one can open
Max Range Age00Lifespan of a box. 0 is unlimited. A positive value retires the box after that many bars

The setting in this group that visibly changes the chart is Range Anchoring.

With Scan window only, the Box Covers Just the Window That Was Tested

Range Anchoring decides where the left edge of the box is placed.

With Scan window only, the Box Covers Just the Window That Was Tested① The 40 bars that were tested ② On default settings the left edge walks back to hereRANGE 28 BARS 9.84%▼ BreakoutRANGE 51 BARS 14.37%The 40 bars that were testedOn default settings the leftedge walks back to here

Vowars DE ver.3.12.30

The box starts 40 bars back from the bar where the range qualified. With the default, Extend to containment, the left edge in this same spot reaches another 14 bars further back.

With Scan window only, the window used for detection becomes the start of the box, as in Figure ①. The default, Extend to containment, walks the left edge further back from there for as long as closes stay inside the box. In the same spot it reaches the position shown in Figure ②, so the box covers the consolidation from where it began.

I prefer the default. When I draw a box by hand I usually start from the first bar of the consolidation too, so it matches my instinct. The trade-off is that because the left edge reaches back, a box can overlap an older one. If the overlap bothers you, try Scan window only.

Breakout Buffer (ATR) ties directly to how many fakeouts you see. On symbols with a lot of marginal breaks, raising it to 0.25–0.30 filters out the weak ones. Confirmation comes later as a result, so it is a trade-off between speed and certainty. Setting Break Confirmation to Wick beyond closes the box as soon as a wick crosses. It is aimed at traders who want to capture quick moves such as stop runs, and Absorb Overshoot does not apply in this mode.

Visual Settings / Adjusting the Look

Parameters
SettingDefaultSuggestedEffect
Color PresetCustomTo tasteColor scheme for upside and downside breaks. Choose from Classic, Aqua, Cosmic, Cyber, Neon, and Custom
Bullish Color / Bearish Color / Range ColorGreen / Red / GrayTo tasteColors for upside breaks, downside breaks, and live ranges when Custom is selected
Gradient Steps42–4Number of slices in the box shading. Fewer slices let more past boxes stay on the chart
Fill Transparency8885–95How light the box shading is. Higher values make the candles easier to see
Show Equilibrium LineOnOnShows the equilibrium line
Show Quartile LevelsOnOnShows the 25% and 75% lines
Show Range LabelsOnOnShows the tag
Show Breakout MarkersOnOnShows the Breakout markers
Show Deviation MarkersOnOnShows the Deviation markers
Label Text SizeSmallSmallText size for tags and markers

Colors are contrast-corrected against the background automatically, so the lines stay visible on both light and dark themes. When the chart gets crowded with other indicators, turning off Show Quartile Levels and keeping only the equilibrium line cleans things up nicely.

Suggested Setups by Goal

GoalWhat to changeWhy
Catch small consolidations on lower timeframesBase Scan Length to 15, Deviation Window to 5Scans from a shorter window and shortens the wait for a return, so it reacts faster
Fewer boxes, big consolidations onlyCompression Percentile to 30, Min Boundary Touches to 3Narrows it down to tight windows whose edges were tested repeatedly
Test breakouts mechanicallyMerge Deviations offPrinted markers never disappear later, so your records match the results
Stabilize boxes on symbols with erratic wicksBoundary Basis to Body extremesBoundaries come from bodies only, so sudden wicks do not throw the box off

Does It Repaint?

Whether you can trust the boxes and markers on past bars is a fair question. The answer depends on the settings, so let’s take it piece by piece.

The default Signal Timing is Bar close, which means range detection, break confirmation, and alerts all happen only after the bar closes. A reading made when a bar closes never changes for that bar afterward. On the forming bar, all you see is the right edge of the box extending out to the current bar.

That does not mean nothing ever moves once it is drawn, though. Three things happen by design.

  • A box first appears on the bar where it is detected, and at that point its left edge is drawn back into the past. The left portion of the box was not on the chart in real time.
  • When Merge Deviations is on, a Breakout marker can be withdrawn for up to 10 bars, and when that happens a Deviation marker is printed on a past bar.
  • An unconfirmed (FORMING) box disappears without a trace the moment it breaks.

All of this is spelled out in the settings tooltips, so none of it is hidden repainting. Even so, do not look at a historical chart and conclude you could have bought at the left edge of the box. To see how things actually looked in real time, step through bar by bar with TradingView’s Bar Replay. Daily and higher timeframes can be replayed over the full history on any plan, while on intraday timeframes how far back you can go depends on your plan and the timeframe (as of October 6, 2026).

Setting Signal Timing to Live bar runs the evaluation on the forming bar too. Signals come earlier, but boxes and markers can appear and disappear until the bar closes. It is meant for discretionary traders who want an early heads-up. For backtesting and alerts, staying on Bar close is the safer choice.

Older Boxes Drop Off Over Time

TradingView caps a single indicator at 500 boxes. “Auto Range Detector” uses five boxes per range, so only about the last 100 ranges stay on the chart. Anything older is removed as new boxes are drawn. If you want to look further back, lowering Gradient Steps increases how many ranges can be kept.

Five Alerts, All Firing on Bar Close

“Auto Range Detector” comes with five alert conditions. In TradingView’s Create Alert dialog, select “Auto Range Detector” under Condition and you can pick from the following.

ConditionWhen it fires
Range DetectedA new range was detected
Range Breakout UpA confirmed range broke to the upside
Range BreakdownA confirmed range broke to the downside
Any Range BreakA break in either direction
Range DeviationAfter a break, a bar closed back inside the box

The one I find most useful is Range Detected. It tells you when a symbol on your watchlist has gone into consolidation, so you can wait for the box to form before you even open the chart. Range Deviation is also handy if you like to trade reversals off fakeouts.

Alert frequency is chosen in the Create Alert dialog. On the default Bar close setting the evaluation itself only runs when a bar closes, so whichever frequency you pick, the alert will not fire before the close. Note that when a provisional range breaks, there is no marker and no alert.

Strengths I Found in Use, and Things to Watch

What you can rely on

  • It checks rotation, touches, drift, and containment as well as width, so the boxes land close to where your eye would put them
  • Detection is based on ATR and a comparison with history, so the same settings carry across symbols and timeframes
  • Failed breaks are merged into one box as Deviations, so the chart does not get chopped into pieces
  • The equilibrium line and the 25% / 75% lines show where price sits inside the box at a glance
  • Default settings evaluate on bar close, and five alert conditions are included

What to watch

  • A box only appears once the conditions are met, so it is not on the chart in the early part of a consolidation
  • While Merge Deviations is on, a Breakout marker can be withdrawn for up to 10 bars
  • The left edge is drawn back into the past, so historical charts make it look like you could have spotted the range earlier than you really could
  • Detection does not start for roughly the first 200 bars of the chart
  • For trade decisions at the box edges, adding a momentum indicator makes it easier to build a case

Most of the points to watch come from the fact that it confirms a range before drawing it. No box appears until one of the three windows passes the tests, so the display inevitably starts in the later part of a consolidation. In return, every box you see has made it through those tests. It is best used with the understanding that it puts reliability ahead of speed.

A Dedicated Ruler for Consolidation, With a Definition of “Range” You Set Yourself

“Auto Range Detector” takes the simple job of boxing sideways price action and builds it out with remarkable care. Width, rotation, touches, drift, containment: each element that makes up a range is its own condition, and every one can be matched to your own standards.

Auto Range Detector [QuantAlgo]

The defaults are plenty to start with. Check the higher timeframe for a box, use the box edges and the three dotted lines as reference levels, and after a break give it 10 bars to see whether price comes back. Once that routine feels natural, nudge the number of boxes and the left-edge placement toward your own taste, and it should slot in comfortably as a replacement for the rectangles you used to draw by hand.

Of course, a box does not guarantee a bounce, and a Breakout does not guarantee follow-through. Confirm momentum with RSI or volume, decide where your stop goes first, and use it as a ruler for reading consolidation.

Sources: For this article we tested an indicator built by QuantAlgo on the charting platform TradingView, then analyzed it in depth before publishing.

Disclaimer: This article is for informational purposes only and isn't investment advice or a recommendation to buy or sell. All investment decisions are your own.

FOLLOW VOWARS
Never miss a new indicator
Get Vowars in Google search, a browser alert on publish, or updates on X.
YUZURU
AuthorYUZURUFounder & Reviewer, Vowars
View profileClose

An editor for content sites at a web agency, I started trading crypto in 2018. Working my way from spot to futures got me hooked on chart analysis, and I now build my own custom indicators on TradingView. On Vowars, I test TradingView indicators one by one on my own charts and review everything from the math behind them to how to use them and where they fall short, with custom visuals throughout.…

Created by

Vowars Picks

Stochastic Heat Map

“Stochastic Heat Map” Tested: Bottom-to-Top Color Shifts That Show How Real a Move Is

"Stochastic Heat Map" is an oscillator that stacks 28 Stochastics with lengths from 10 to 280 as colors, showing where price sits in its range on every lookback at once. The way color spreads from the bottom rows to the top tells you how strong a move is, but red stays pinned in strong trends, so it works best with direction handled separately by something like an EMA.

DifficultyIntermediate

CME Institutional Order Flow & AMT Lens

Auction Market Theory on One Chart: An Indicator That Flags Volume Absorption by Color

“CME Institutional Order Flow & AMT Lens” is a TradingView indicator that combines a volume profile, candle coloring, shelves, and a dashboard in one. It gives no buy or sell signals and instead automatically marks key prices such as the POC and Value Area.

DifficultyAdvanced

Fibonacci Trend Continuation Signals [AlgoAlpha]

Measure Pullback Depth Inside a Trend With “Fibonacci Trend Continuation Signals”

"Fibonacci Trend Continuation Signals" is a free TradingView indicator that automatically draws a Fibonacci range in the direction of the trend and prints a continuation signal the moment price starts moving again after a pullback or bounce. It gives you an objective read on pullback depth.

DifficultyIntermediate

Smart Trader, Episode 06, Isotropic Trend Lines

“Isotropic Trend Lines” Review: σ-Scaled Trend Angles and a Six-Timeframe Vote Tested on Live Charts

Isotropic Trend Lines puts price on a log scale and divides it by volatility (σ), giving you a trend angle that doesn't change with chart scaling. Direction, strength and position inside the channel all show on one screen. Just note that the angle only appears once you turn on Show Angle Label.

DifficultyIntermediate

Strong Burst Fader

Touching the Band Isn’t Enough — “Strong Burst Fader” Measures the Depth of the Stretch

"Strong Burst Fader" is a counter-trend indicator that measures how far a wick pokes beyond a moving average ± ATR band and shows that depth as the height and color of a diamond stack. The taller and redder the stack, the more overextended the move, and you can read it without adding a single line to your chart.

DifficultyIntermediate

Divergence for Many Indicators v4

Divergence for Many Indicators v4 : How to Read Divergence Across 10 Indicators in One Label

"Divergence for Many Indicators v4" is a TradingView indicator that detects divergence across 10 indicators, including RSI and MACD, and shows how many line up in a single label. Signals come early, but only the last one survives within the same swing. It works best once you've defined market direction.

DifficultyIntermediate

Browse by goal

1 / 5