# NR4 & NR7 with Breakouts

NR4 & NR7 with Breakouts flags Toby Crabel's narrow-range bars (a range tighter than the three or six bars before it) boxing each pattern and extending its range as live levels. A close beyond the range fires a directional breakout signal with reset logic tied to the range mean, giving compression-and-expansion traders a mechanical, testable setup.

- Indicator in the LuxAlgo Library, by LuxAlgo, published Apr 30, 2025.
- Access: free.
- Concepts: [NR4/NR7 Narrow-range Bars](https://www.luxalgo.com/library/concept/nr4-nr7-narrow-range-bars/) (primary), [Breakout](https://www.luxalgo.com/library/concept/breakout/)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=cmpwn46ht005uvhsg2fyu5yw6
- Page: https://www.luxalgo.com/library/indicator/nr4-nr7-with-breakouts/

Volatility contracts before it expands, and **NR4 & NR7 with Breakouts** is built on exactly that rhythm. The indicator scans for [NR4 and NR7 narrow-range bars](https://www.luxalgo.com/library/concept/nr4-nr7-narrow-range-bars/) (bars whose high-low span is tighter than the three or six bars before them) then boxes each one and extends its range with lines, so a coiled market is visible the moment it forms.

## How to Trade the NR4 & NR7 with Breakouts?

- **Marked zone and range lines**: a fresh narrow-range bar defines the exact levels to set limit orders and frame risk around.
- **Breakout signal**: fires when a candle closes outside the detected range, stamping the direction of the [breakout](https://www.luxalgo.com/library/concept/breakout/); signals key off the most recent pattern until a new one appears.
- **Reset at the Range Mean**: after a signal, the logic pauses until price revisits the range's mean, preventing repeat triggers from a single pattern.

Every NR7 is by definition also an NR4, though not the reverse, so switching the pattern selection changes what is highlighted rather than what exists. These formations were historically studied on daily bars; the indicator can generate them from any timeframe above your chart's, and choosing that timeframe deliberately preserves the pattern's meaning.

## NR4 & NR7 with Breakouts Settings

- **Timeframe**: the timeframe scanned for NR4 and NR7 patterns. Set it higher than the chart's own.
- **Pattern Type**: choose which patterns to visualize, NR4, NR7, or both.

## Frequently Asked Questions

### Why did switching from NR7 to NR4 not change the detected range?

Because NR7 bars are a subset of NR4 bars: the narrowest bar of seven is automatically the narrowest of four. The selection changes the visual emphasis, not the underlying detection.

### What pairs well with the narrow-range setup?

The pattern set traces back to Toby Crabel, the same research lineage as the opening range breakout, and the [Ultimate Opening Range Breakout](https://www.luxalgo.com/library/indicator/ultimate-opening-range-breakout/) applies a session-anchored take on the same contraction-then-resolution premise. Layering other market data over the signals for confirmation refines entries further.

### How can I access NR4 & NR7 with Breakouts?

It is free to everyone in the LuxAlgo Library. It also runs in Quant, our coding agent, so you can backtest the breakout logic straight from this page. You can also copy the source code from this page and run it anywhere Pine Script® runs.

## Related indicators

- [Breakouts with Tests & Retests](https://www.luxalgo.com/library/indicator/breakouts-with-tests-retests/) (Breakout): markdown at https://www.luxalgo.com/library/indicator/breakouts-with-tests-retests.md
- [Breakout Detector (Previous MTF High Low Levels)](https://www.luxalgo.com/library/indicator/breakout-detector-previous-mtf-high-low-levels/) (Breakout): markdown at https://www.luxalgo.com/library/indicator/breakout-detector-previous-mtf-high-low-levels.md
- [Volatility Contraction Pattern](https://www.luxalgo.com/library/indicator/volatility-contraction-pattern/) (Volatility): markdown at https://www.luxalgo.com/library/indicator/volatility-contraction-pattern.md
- [Master Pattern](https://www.luxalgo.com/library/indicator/master-pattern/) (Range Expansion/contraction): markdown at https://www.luxalgo.com/library/indicator/master-pattern.md
- [Waddah Attar Explosion](https://www.luxalgo.com/library/indicator/waddah-attar-explosion/) (Volatility): markdown at https://www.luxalgo.com/library/indicator/waddah-attar-explosion.md
- [Squeeze Index](https://www.luxalgo.com/library/indicator/squeeze-index/) (Range Expansion/contraction): markdown at https://www.luxalgo.com/library/indicator/squeeze-index.md
- [Choppiness Index](https://www.luxalgo.com/library/indicator/choppiness-index/) (Volatility): markdown at https://www.luxalgo.com/library/indicator/choppiness-index.md
- [Damiani Volatmeter](https://www.luxalgo.com/library/indicator/damiani-volatmeter/) (Volatility): markdown at https://www.luxalgo.com/library/indicator/damiani-volatmeter.md

---

Source: https://www.luxalgo.com/library/indicator/nr4-nr7-with-breakouts/ (LuxAlgo Library). Free to use with attribution: https://www.luxalgo.com/library/license/
