Box Breakout

A run of bars held inside a narrow range, then a close beyond it, up or down, as one node. Sensitivity sets how tight the box is. How AlgoLift finds it.

IndicatorBy AlgoLiftUpdated 5 min read
On this page 11What it measuresFormulaInputs in AlgoLiftOutputs in AlgoLiftHow to read itBest in, worst inThree setups1. Box breakout with a trend filter2. Measured-move exits3. Breakouts from quiet markets onlyCommon mistakes

TL;DR. A box is a stretch of bars that stays inside a narrow range, a consolidation, and a box breakout is the first close beyond it. The Box Breakout node finds the box, fires once on the bar that closes above its top or below its bottom, and hands you the breakout level, a measured-move target and a stop. One Sensitivity setting decides how tight and how long the box must be.

What it measures

  • A pause before a move. Price that holds in a tight range for a while is coiling. A close outside the range says the pause has ended.
  • Both directions in one node. The same box can break either way. The node's breakout reads +1 for a break up and -1 for a break down.
  • Once per box. The breakout fires on one bar. The next box on that side is built from the bars after the breakout, so a strategy never re-enters the same box.

Formula

Inputs in AlgoLift

SettingDefaultRangeNotes
Sensitivity51 to 10How strict the box is. 1 finds only long, tight boxes, 10 the loosest; 5 is the textbook shape. Every setting below moves with it.
Longest box403 to 300 barsThe furthest back a box may reach; older bars drop out of it.
Target (% of height)10010 to 500The target's distance past the breakout, in percent of the box's height. 100 is the classic measured move.
SettingsFrom SensitivityFrom Sensitivity, CustomCustom unlocks the three settings below and reads them as you set them.
Box at most2.5 ATR wide0.1 to 50The box's widest range. Step 1: 1.7, step 10: 3.65.
Box at least17 bars2 to 300The fewest bars the box must hold before a break counts. Step 1: 23, step 10: 11.
Breaks by0.1 ATR0 to 5How far past the box a close must be. Step 1: 0.25, steps 9 and 10: 0.

Outputs in AlgoLift

HandleTypePlottedNotes
BreakoutNumericAlways+1 on a break up, -1 on a break down, 0 elsewhere. Wire it into a Comparison (greater than 0 for longs, less than 0 for shorts).
Upside box breakout, Downside box breakoutNumericOn select1 on that side's breakout bar, else 0.
StageNumericOn selectThe box forming now: 0 none, 1 forming, 2 armed. A box forms on both sides at once, so it reads positive until one side breaks.
Breakout levelNumericAlwaysThe armed box's top (its bottom when only the downside box is still forming).
Pattern high, Pattern lowNumericOn selectThe forming box's top and bottom.
Target, StopNumericOn selectThe last breakout's measured move and the box's far side, held until the next breakout.
Bars formingNumericOn selectBars since the box's first bar.

How to read it

  • Stage 2: a box has held long enough and its top is drawn. A close beyond its top or bottom is the signal.
  • Stage 1: bars are holding a tight range, but not for long enough yet.
  • A box that disappears without a marker: a bar widened the range past the limit without closing outside it.
  • Many signals: lower Sensitivity one step at a time. A stricter step asks for a longer, tighter box.
Common Misconception
Myth
The longer the box, the bigger the breakout.
Reality
A longer box often has a larger measured move, but it also breaks more slowly and fails just as often. Test the step you trade on months it was not chosen on.

Best in, worst in

Best in markets that alternate between quiet ranges and directional moves, such as the hours before a session open or a scheduled report.

Worst in markets that keep ranging: price leaves the box by a tick and comes back. A small Breaks by margin or a trend filter cuts many of these.

Three setups

1. Box breakout with a trend filter

Wire Breakout into a Comparison (greater than 0) and AND it with an EMA trend filter into a long Entry. Mirror it with less than 0 for shorts.

2. Measured-move exits

Set a Bracket Order with its target at the node's Target and its stop at the node's Stop, so every trade's exits come from its own box.

3. Breakouts from quiet markets only

Require the ADX/DMI below 20 at the breakout, so only boxes that formed in a quiet, directionless market count.

Common mistakes

  • Building the box by hand. A chain of highest-high and lowest-low comparisons can find a range, but not one that fires once and needs fresh bars for the next. The node holds that memory.
  • Loosening several rules at once. Move Sensitivity one step. If you need one rule different, switch Settings to Custom and change only that one.
  • Choosing Sensitivity on the backtest you report. Pick it on one window and check it on another (overfitting in trading).
Key Takeaway

The Box Breakout node finds a run of bars inside a narrow range and the close beyond it, up or down, once per box. Sensitivity sets how tight and how long the box must be with one number.