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
| Setting | Default | Range | Notes |
|---|---|---|---|
| Sensitivity | 5 | 1 to 10 | How 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 box | 40 | 3 to 300 bars | The furthest back a box may reach; older bars drop out of it. |
| Target (% of height) | 100 | 10 to 500 | The target's distance past the breakout, in percent of the box's height. 100 is the classic measured move. |
| Settings | From Sensitivity | From Sensitivity, Custom | Custom unlocks the three settings below and reads them as you set them. |
| Box at most | 2.5 ATR wide | 0.1 to 50 | The box's widest range. Step 1: 1.7, step 10: 3.65. |
| Box at least | 17 bars | 2 to 300 | The fewest bars the box must hold before a break counts. Step 1: 23, step 10: 11. |
| Breaks by | 0.1 ATR | 0 to 5 | How far past the box a close must be. Step 1: 0.25, steps 9 and 10: 0. |
Outputs in AlgoLift
| Handle | Type | Plotted | Notes |
|---|---|---|---|
| Breakout | Numeric | Always | +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 breakout | Numeric | On select | 1 on that side's breakout bar, else 0. |
| Stage | Numeric | On select | The 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 level | Numeric | Always | The armed box's top (its bottom when only the downside box is still forming). |
| Pattern high, Pattern low | Numeric | On select | The forming box's top and bottom. |
| Target, Stop | Numeric | On select | The last breakout's measured move and the box's far side, held until the next breakout. |
| Bars forming | Numeric | On select | Bars 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.
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).
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.