2005issue C061-2
Box-and-breakout states written as ordered entry and exit rules
Editorial view: a box-and-breakout idea is unfinished until new extremes, box lock, breakout entry, box-failure exit and abstention are written as ordered rules a procedure can fire or refuse. The construction does that by confirming a range high and range low, locking the box, then applying entry, exit and regime tests in order.
- A confirmed range high needs a three-bar delay and a lookback-window comparison. A confirmed range low needs a three-bar delay, later lows that stay above it and later highs that stay under the confirmed range high.
- Box completion locks the ceiling and floor from that pair. The locked box then persists until a later valid box replaces it.
- The modified close breakout enters on a close through the locked ceiling only while box completion is more recent than the last confirmed exit. Changing that test to a high through the ceiling turns the same procedure into the classic high breakout.
- A low under the locked floor is only a possible exit. A confirmed exit still requires box completion to remain more recent than that event, and alerts are written so the indicated action is taken on the following open.
Every state has to be a rule
Editorial view: treat a box-and-breakout idea as unfinished until every state is written as an ordered, testable rule. The states that must be specified are a new extreme, a box lock, a breakout entry, a box-failure exit and abstention. A procedure can then fire or refuse each one.
The construction does that by confirming a range high and a range low, declaring box completion, locking the ceiling and floor, then reading entry, exit and regime tests in that order.
Confirming the range high and range low
A confirmed range high is accepted only after a three-bar delay and a lookback-window comparison show that later highs failed to exceed it. The high three bars earlier must be at least equal to the lookback-window peak taken from four bars earlier, and it must be strictly higher than each of the next three highs.
The lookback window used to locate that range high is specified in a single parameter and is set to 100 periods.
A confirmed range low is accepted only after a three-bar delay, provided later lows stay above it and later highs stay under the confirmed range high. The low three bars earlier must be strictly below the next three lows, and the most recent three highs must all remain below the confirmed range high.
Locking the box
The box is treated as complete when fewer bars have elapsed since the latest confirmed high than since the previous confirmed low. That is box completion: the paired high and low become a locked trading range because the latest confirmed high is more recent than the prior confirmed low.
After box completion, the locked box sets the ceiling and floor to the confirmed range high and the confirmed range low. Those locked levels persist until a later valid box replaces them.
Breakout entry tests
The modified close breakout fires when the close is above the locked ceiling and box completion is more recent than the last confirmed exit.
Replacing the close-above-ceiling test with a high-above-ceiling test converts the same procedure into the classic high breakout. The rest of the sequence stays in place.
Editorial reading: when box completion is not more recent than the last confirmed exit, the procedure abstains even if price is through the locked ceiling.
Australian Pharmaceuticals daily closes and Darvas box levels

Digitized to the nearest 0.05 from the sidebar figure. The source buys on a close above the box high, not on an intra-bar trade through the high. The MetaStock lookback for new extremes is fixed at 100 periods.
Exit, regime and next-open execution
A possible exit is raised when a low prints below the locked floor. It is a candidate, not an automatic exit. A confirmed exit is valid only while box completion remains more recent than that possible-exit event.
The rule set reads the close at or above the locked floor as a bullish state and the close below that floor as a bearish state. That regime state is a reading of the locked floor, not a separate entry or exit.
Alerts in the construction are written so the indicated action is taken on the following open. Editorial note: next-open execution belongs in the rule set with the entry and exit tests, not outside it.
All readings on this track · 23 readings
- 1995Range breakout rules with an expansion filter and moving-average exits
- 1995Write a weekly breakout as one parameterized entry and exit
- 1995Combining a trend rule, a breakout trigger, and a seasonal filter
- 1996Constructing a two-bar clearance breakout from a twenty-session exponential average
- 1996Two-bar exponential-average breakout as setup, stop, and flatten
- 1998A noise-offset breakout judged after walk-forward re-estimation
- 1998Gating a weekly average crossover with stored support and resistance
- 1998Moving-average candidates gated by support and resistance
- 2000Constructing next-close envelope targets for breakout stops
- 2001February soybean high breakout and June trailing stop
- 2005Box-and-breakout states written as ordered entry and exit rules
- 2007Match trend and breakout rules to the market condition
- 2010How a JM internal band becomes long and short entry and exit rules
- 2013Constructing a three-average trend-aligned breakout system
- 2016Volume-confirmed breakout entry rules
- 2017How to construct exponential standard deviation bands
- 2017Four-day green candle breakout as one swing procedure
- 2018Constructing inverse ETF breakouts above a 200-day average
- 2018Evaluating trend, breakout, and regression rules by average robustness
- 2019A crypto pair breakout after a sideways range
- 2019Next-session breakout rules after a high-volume close
- 2020Altcoin dual-stop breakout with a timed exit
- 2020Critiquing required stops in mechanical breakout systems