Article contents
- Evidence and scope
- Illustration
- Process
- Two definitions can overlap without becoming identical
- Freeze the correct boundary for each variant
- A joint inside/NR7 example and a two-sided excursion
- A profit label is not an execution ledger
- Does volume contraction add information?
- Count contraction episodes rather than correlated candles
- Common pitfalls
- Practical checklist
- Frequently asked questions
- Research sources
Evidence and scope
ChartSchool publishes an NR7 implementation and distinguishes high–low range from true range. A community script labels outcomes using subsequent closes. Neither observation alone verifies executable net PnL for the proposed system.
Practical workflow
- Measure rangeUse H−L without silently substituting true range.
- Apply both labelsInside and NR7 remain independent flags.
- Freeze boundariesUse the mother or NR7 bar according to the version.
- Wait for a breakApply the registered TTL and order type.
- Keep all outcomesInclude no fills, two-sided events and costs.
Two definitions can overlap without becoming identical
NR7 uses the smallest H−L range among seven bars; ChartSchool distinguishes this from an ATR1-based variation [1]. An inside bar instead satisfies H[t]≤H[t−1] and L[t]≥L[t−1]. One candle can meet either condition or both. Preserve separate labels rather than using the names interchangeably.
The proposed research groups are inside, nr7 and inside_and_nr7. Contraction can represent a pause within a trend, a quiet session interval or reduced activity before an event. Neither formula contains a bullish or bearish forecast. Direction must come from a registered context rule or a subsequent price event.
Use actual bar construction consistently. Daily bars that include extended hours can have different highs and lows from regular-session bars. A small intraday bar around a scheduled lull may look exceptional only because it is compared with opening bars. Record the session and baseline before interpreting the contraction economically.
Freeze the correct boundary for each variant
For an inside-bar baseline, the previous candle is the mother bar and its high and low define the breakout boundaries. For standalone NR7, use the narrow candle's own high and low. These are different entry variants with different risk distances. If several inside bars nest, keep the original mother until breakout or expiry rather than narrowing the boundary opportunistically.
The proposed strict NR7 requires R[t] to be smaller than each of the six preceding ranges; ties are rejected. TTL=5 bars and buffer=max(2 ticks,0.1×ATR before the setup) are research settings. Reject zero ranges, incomplete windows and instruments whose spread is excessive relative to setup width.
A completed setup is an object with its own ID, frozen boundaries, buffer and expiry. Do not refresh its lifetime merely because another contraction bar appears. A reset policy can be studied separately, but it changes how long the strategy waits and how many apparently independent opportunities it counts.
R[t] = H[t]-L[t]
inside = H[t] <= H[t-1] and L[t] >= L[t-1]
nr7 = R[t] > 0 and R[t] < min(R[t-6:t])
if inside and no_active_setup:
freeze(upper=H[t-1], lower=L[t-1], expires=t+5)
# Alternate NR7 strategy uses H[t], L[t] instead.
for closed bar k after setup:
if k > expires: expire()
elif C[k] > upper+buffer: signal_long(k)
elif C[k] < lower-buffer: signal_short(k)
# Each setup emits at most one signal in this baseline.
A joint inside/NR7 example and a two-sided excursion
Synthetic preceding ranges are 4,3.5,3.2,2.8,2.4,2.0. The next candle has H=104.7, L=103.5, giving range 1.2, the smallest of seven. Its mother has H=105, L=103, so it is also inside. Under the mother-bar baseline, the boundaries remain 105 and 103, not104.7 and 103.5.
With buffer 0.1, a later close 105.3 confirms a long. Entry 105.4 and stop 102.9 imply 2.5 points of price risk and a 2R target 110.4. A synthetic continuation to 110.4 succeeds under that rule; a return to 102.8 stops the position. Correct identification of contraction does not prevent a false breakout.
A subsequent bar with H=105.5, L=102.5, C=104 crosses both sides but produces no signal in the close-confirmed baseline. A strategy with two resting stops may already have entered and reversed or stopped. The final close cannot establish that no trade occurred under that different order policy.
Boundary tests should include an inside bar sharing the mother's high, an NR7 tying an earlier minimum, and a bar with a small high–low range but a large overnight gap. The last can qualify under H−L while failing a true-range version; that is a definition difference that must remain visible.
A profit label is not an execution ledger
The TradingView community author describes NR4/NR7 profit/loss labels using whether the following day crosses a boundary and closes favorably [2]. That is an outcome classification. It does not automatically resolve intrabar sequence, transaction costs or actual fill prices.
TradingView documents broker-emulator assumptions and intrabar data limitations [3]. The proposed baseline here waits for a close and uses a subsequent executable open. This reduces certain path ambiguities but introduces confirmation delay and gap exposure; it is not equivalent to a resting-stop system.
If testing two stop orders with OCO handling, simulate when the first fill becomes known and when cancellation of the other order takes effect. OCO cannot delete a second fill that occurred during the cancellation delay. Track rejected cancels, partial fills and resulting exposure instead of assuming perfect instantaneous cancellation.
Use a fixed stop and exit plan from the selected version. A narrow NR7 candle may imply a much tighter stop than a broad mother bar. Comparing their headline returns without matching risk and execution can attribute a sizing effect to the pattern definition.
Does volume contraction add information?
Proposed features are setup volume divided by the median of the preceding 20 observations and RVOL on the breakout. Experimental thresholds could be setup volume below 0.8 of baseline and breakout volume above 1.5. Intraday comparisons must account for time-of-day seasonality: quiet midday activity is not automatically accumulation.
Keep a minimum-liquidity filter separate from unusual-volume selection. An almost inactive asset can generate NR7 easily while its spread exceeds much of the intended stop distance. Report transaction cost in units of initial R for every trade rather than only a small-looking dollar commission.
For close-confirmed entries, full breakout-bar volume is available after the close. A resting order submitted beforehand can use only information known at submission, such as partial volume against a comparable partial baseline. Do not allow final volume to determine whether an earlier filled order supposedly existed.
Test contraction volume and expansion volume separately before combining them. Otherwise a successful combined branch cannot reveal whether either feature adds predictive information or simply reduces opportunity count. Keep the same boundary, risk budget and exit across the volume ablation.
Count contraction episodes rather than correlated candles
Consecutive NR7 bars should belong to one episode or follow a documented reset policy. Opening one independent trade for every bar in the same region increases the apparent sample size while retaining strong dependence. Store parent_setup_id and a shared risk budget for an episode when that matches the strategy.
Compare inside-only, NR7-only and their intersection on the same data. Add a control that breaks an equally narrow range without requiring the seven-bar minimum. This tests whether the NR7 label contributes beyond low absolute or ATR-normalized width.
Report fill rate, whipsaw frequency, net expectancy, drawdown and waiting time, including setups that expire without a signal. A collection of explosive breakout pictures omits the quiet and failed episodes that determine a deployable strategy's economics.
Implementation fixtures should replay nested mother bars, expiry immediately before a break, two-sided excursions, missing bars and equality at a boundary. Then stress costs, one-bar latency and a gap beyond entry. Keep detector labels unchanged while allowing the execution layer to report the different feasible outcomes.
Common pitfalls
Equating NR7 with ATR1
A gap makes true range differ from H−L; the detectors can select different bars.
Assuming smaller stops are always better
A small stop can make spread and slippage dominate performance in R units.
Ignoring path order in profit labels
A daily OHLC summary does not establish that orders filled in the favorable sequence.
Checklist before using this method
Check each item after verifying it on your data. Progress is saved in this browser; it does not certify a profitable strategy.
Frequently asked questions
Is an inside bar bullish or bearish?
It is direction-neutral. Prior context or a later breakout can supply direction, but that additional rule must be explicit.
Can both breakout directions be traded?
A two-sided design can be researched with an OCO and exposure model. This baseline allows only one first qualifying trigger per setup.
Research sources
Each source supports the definition or evidence described beside it. The pseudocode, synthetic examples and proposed parameters require separate validation.
- Narrow Range Day NR7StockCharts ChartSchool. Read the provider's explanation and scan; the referenced Crabel book was not read in full. Checked: .
- NR4 / NR7 + Inside BarAtma_Sakshatkar on TradingView. Read the author's description; the script was not run or audited. Checked: .
- Pine Script: StrategiesTradingView. Read order modeling and intrabar-data limitations. Checked: .
Related methods
Risk note
This content supports education and research design, not financial advice. Backtest is historical simulation, does not guarantee future performance and does not place real trades. Methods in this library are not automatically features available in the app. See methodology and learning center.
Validate rules before risking real capital
Check app support, data and individual simulated trades; advanced detectors may require a separate implementation.
Download Backtest on the App Store