Black Friday: 2 years for the price of 1.Or 3 months for the price of 1. On Pro.2 d 5 hleftSee plans →
Free tool

Breakout or retest: which entry does better on NQ's opening range?

NQ's 15-minute opening range entered two ways on MNQ from 4 November 2024 to 22 October 2026. The break enters after the first close outside the range. The retest waits at the broken level. Written in Pine Script? Paste it here: a free account with no card runs it on CME Group futures with $2.50 a contract and a tick of slippage charged.

Free plan · unlimited backtests · no card
NQ's 15-minute opening range at 2R · entered on the retest against the breakMNQ1! · 5-minute · 4 November 2024 → 22 October 2026
Retest over 2 years
+$3,834
Break over 2 years
+$1,222
Breaks never retested by 12:00
71 of 500
The break on those days
+$16,205
Entered on the retest+$3,834
Entered on the break+$1,222
Nov 2024Feb 2026Oct 2026

The $50,000 account after each trade. One MNQ contract pays $2.50 a contract each side and a tick of slippage. Dashed: the same script entering on the break. Shaded: from 24 February 2026.

Paste your script

Pine v6, as TradingView has it.

NQ's 15-minute opening range at 2R · entered on the retest against the breakMNQ1! · 5-minute · 4 November 2024 → 22 October 2026
Retest over 2 years
+$3,834
Break over 2 years
+$1,222
Breaks never retested by 12:00
71 of 500
The break on those days
+$16,205
Entered on the retest+$3,834
Entered on the break+$1,222
Nov 2024Feb 2026Oct 2026

The $50,000 account after each trade. One MNQ contract pays $2.50 a contract each side and a tick of slippage. Dashed: the same script entering on the break. Shaded: from 24 February 2026.

Entering on the break made more over two years at three of four targets. Entering on the retest made more at 2R.

We ran NQ's 15-minute opening range at 1R, 1.5R, 2R and 3R on MNQ 5-minute bars from 4 November 2024 to 22 October 2026. The break enters on the bar after the first close outside the range. The retest waits at the broken level with a limit order until 12:00. Of the 500 breaks, 71 never came back to that level by then. On those days the break made $14,997 to $16,289. The retest had no trade on them. On the 429 days both entered, the retest did better at every target. None of the 8 runs made money from 24 February 2026 to 22 October 2026.

All 8 runs

RUNTRADES2 YEARS4 NOV 2024 → 23 FEB 202624 FEB 2026 → 22 OCT 2026WORST DRAWDOWN
1R · Break500+$6,693+$10,064.50−$3,371.50−$5,347.50
1R · Retest429+$1,744+$6,349.50−$4,605.50−$6,664.50
1.5R · Break500+$6,308.50+$12,188−$5,879.50−$8,995
1.5R · Retest429+$4,478.50+$7,246−$2,767.50−$6,098
2R · Break500+$1,222+$8,850−$7,628−$10,373.50
2R · Retest429+$3,834+$7,018.50−$3,184.50−$6,988
3R · Break500−$6.50+$8,094−$8,100.50−$11,648
3R · Retest429−$1,850+$3,462−$5,312−$9,248

One MNQ contract on a $50,000 account pays $2.50 a contract each side and a tick of slippage. The worst drawdown is the deepest fall from a high between 4 November 2024 and 22 October 2026. The 8 settings were fixed before the runs.

Where the difference comes from

At 2R, 71 breaks never came back to the broken level by 12:00. The break entry made +$16,205 on those days. On the other 429 days both entries traded the same side. There the break lost $14,983 and the retest made +$3,834. The retest gets a better price and risks only the range's height. The break also catches the days the price runs and never looks back.

TARGETBREAKS NEVER RETESTEDTHE BREAK ON THOSE DAYSDAYS BOTH ENTEREDTHOSE DAYS: BREAK → RETEST
1R71+$14,997429−$8,304 → +$1,744
1.5R71+$15,829.50429−$9,521 → +$4,478.50
2R71+$16,205429−$14,983 → +$3,834
3R71+$16,289429−$16,295.50 → −$1,850

The script as it ran

NQ 15-minute opening range entered on the retest at 2R

The range is 9:30 to 9:45 New York. The day's first 5-minute close outside it between 9:45 and 12:00 sets the side. A limit order then waits at the broken level until 12:00. The stop sits at the range's other side and the target at twice the range; one trade a day. Its Entry input switches to Break.

Trades
429
Won
43.8%
Profit factor
1.08
Net
+7.7%
Worst drawdown
−11.8%
Worst trade
−$646

MNQ1! · 5-minute · 4 Nov 2024 → 22 Oct 2026 · $2.50 a contract each side and a tick of slippage · one contract on a $50,000 account

+$7,018.50 from 4 November 2024 to 23 February 2026, −$3,184.50 from 24 February 2026 to 22 October 2026.

Pine Script v6 · 86 linesRun this script
//@version=6
// Suggested timeframe: 5-minute
strategy("NQ Opening Range: break or retest", overlay=true, initial_capital=50000, default_qty_type=strategy.fixed, default_qty_value=1,
     commission_type=strategy.commission.cash_per_contract, commission_value=2.5, slippage=1, margin_long=0, margin_short=0)

// Inputs: the opening range, the entry window, the target and how to enter, all on New York's clock
orSess    = input.session("0930-0945", "Opening range (New York)")
tradeSess = input.session("0945-1200", "Entry window (New York)")
rMult     = input.float(2.0, "Target (R)", minval=0.5, step=0.5)
entryMode = input.string("Retest", "Entry", options=["Break", "Retest"])

inOR    = not na(time(timeframe.period, orSess, "America/New_York"))
inTrade = not na(time(timeframe.period, tradeSess, "America/New_York"))

// The day's state, set back on the futures day's first bar (18:00 New York)
var float orHigh      = na
var float orLow       = na
var int   tradesToday = 0
var int   breakDir    = 0
var int   dayStart    = 0
var float stopLevel   = na
var float targetLevel = na
if session.isfirstbar
    orHigh      := na
    orLow       := na
    tradesToday := 0
    breakDir    := 0
    dayStart    := strategy.closedtrades + strategy.opentrades

if inOR
    orHigh := na(orHigh) ? high : math.max(orHigh, high)
    orLow  := na(orLow) ? low : math.min(orLow, low)
rangeSet = not inOR and not na(orHigh)
breakUp  = rangeSet and close > orHigh and close[1] <= orHigh
breakDn  = rangeSet and close < orLow and close[1] >= orLow

// The day's first break inside the window sets the side; only that break is traded
if inTrade and barstate.isconfirmed and breakDir == 0 and tradesToday < 1
    breakDir := breakUp ? 1 : breakDn ? -1 : 0
    if breakDir != 0 and entryMode == "Break"
        // Break: enter at the next bar's open, the stop at the range's other side
        if breakDir == 1 and orLow < close
            stopLevel   := orLow
            targetLevel := close + (close - orLow) * rMult
            strategy.entry("Long", strategy.long)
            strategy.exit("Long exit", from_entry="Long", stop=stopLevel, limit=targetLevel)
            tradesToday := 1
        if breakDir == -1 and orHigh > close
            stopLevel   := orHigh
            targetLevel := close - (orHigh - close) * rMult
            strategy.entry("Short", strategy.short)
            strategy.exit("Short exit", from_entry="Short", stop=stopLevel, limit=targetLevel)
            tradesToday := 1

// A filled retest is the day's one trade, even one that hits its stop or target on the bar it fills
if strategy.closedtrades + strategy.opentrades > dayStart
    tradesToday := 1

// Retest: after the break, a limit order at the broken level until 12:00; the stop at the range's
// other side, so the risk is the range itself
if entryMode == "Retest" and inTrade and tradesToday < 1 and strategy.position_size == 0 and breakDir != 0
    if breakDir == 1
        stopLevel   := orLow
        targetLevel := orHigh + (orHigh - orLow) * rMult
        strategy.entry("Long", strategy.long, limit=orHigh)
        strategy.exit("Long exit", from_entry="Long", stop=stopLevel, limit=targetLevel)
    if breakDir == -1
        stopLevel   := orHigh
        targetLevel := orLow - (orHigh - orLow) * rMult
        strategy.entry("Short", strategy.short, limit=orLow)
        strategy.exit("Short exit", from_entry="Short", stop=stopLevel, limit=targetLevel)
// An unfilled retest is cancelled when the window closes
if not inTrade and strategy.position_size == 0
    strategy.cancel("Long")
    strategy.cancel("Short")

// The same stop and target on every bar of the trade; flat on the session's last bar
if strategy.position_size > 0
    strategy.exit("Long exit", from_entry="Long", stop=stopLevel, limit=targetLevel)
if strategy.position_size < 0
    strategy.exit("Short exit", from_entry="Short", stop=stopLevel, limit=targetLevel)
if session.islastbar
    strategy.close_all("Session end", immediately=true)

plot(rangeSet ? orHigh : na, "Range high", color=color.new(#16A56A, 0), style=plot.style_linebr)
plot(rangeSet ? orLow : na, "Range low", color=color.new(#E5484D, 0), style=plot.style_linebr)

A VWAP filter on the same range is tested in Does a VWAP filter improve the NQ opening range breakout?. The range on its own has its own study: NQ opening range breakout.

Free account

No card, no time limit.

$0
  • Unlimited backtests, costs charged, with the out-of-sample check
  • The Pine script audit and the full trade list
  • The Pine Copilot writes and edits your script
  • 50 AI credits a day
The Alpha Charts terminal a free account opens: the Pine Copilot beside the chart

Prop Ready opens all two years of futures minute bars on a computer for $39 paid once and has 7 days money back. Pro adds the optimiser and every AI tool and has 30 days money back. See the plans

Questions

Breakout or retest: which entry does better on NQ's opening range?

Over two years the break made more at 1R, 1.5R and 3R and the retest at 2R. On MNQ 5-minute bars from 4 November 2024 to 22 October 2026, 71 of 500 breaks never came back to the broken level by 12:00. The break's profit came from those days. On the days both entered, the retest did better at every target.

What counts as a retest here?

The day's first 5-minute close outside the range between 9:45 and 12:00 sets the side. A limit order then waits at the broken level: the range high for a long, the range low for a short. It fills if the price comes back to it before 12:00 and is cancelled if not. The stop sits at the range's other side. The risk is the range's height.

Why did the breakout make more over two years?

Because of the days the price never came back. At 2R the break made +$16,205 on the 71 days the retest never filled. On the 429 days both entered it lost $14,983. The retest made +$3,834 on those days.

Did either entry make money in 2026?

No. All 8 runs lost money from 24 February 2026 to 22 October 2026. The retest lost less at 1.5R, 2R and 3R. At 2R it lost $3,184.50 there and the break $7,628.

What were the rules and the costs?

The opening range is 9:30 to 9:45 New York on 5-minute bars. The break enters at the open of the bar after the first close outside the range. Its stop sits at the range's other side. Targets are 1, 1.5, 2 or 3 times the risk. There is one trade a day. A trade still open closes on the futures day's last bar. One MNQ contract on a $50,000 account pays $2.50 a side and a tick of slippage.

Can I run it myself?

Yes. Run opens the script on MNQ 5-minute bars in the Alpha Charts terminal. On a computer, a free account with no card runs it as published on all two years. Its Entry input switches between Retest and Break. A changed input or line makes it your own script: a free account then tests the newest 30 days of a chart under an hour. Prop Ready ($39 paid once) opens all two years for 30 days.

Is a backtest a prediction?

No. It is what a strategy's rules would have done on past prices with costs charged. Live fills, news and your own execution differ. Read it as a test of the rules and not as a forecast.

Every number comes from Alpha Charts' tester on MNQ 5-minute bars from 4 November 2024 to 22 October 2026. The runs were made on 25 November 2026. Alpha Charts is software for testing trading scripts and gives no investment advice. A backtest shows what rules would have done on past data. It does not show what they will do. Our methodology is in Data and methodology. Updated 28 November 2026.

Test your Pine Script freeFree account, no cardPaste your script