BACKTEST STUDY · NQ AND ES FUTURES

Trading every liquidity sweep on NQ made $1,412. Then costs took $54,900

14 versions on two years of real NQ and ES data, costs charged. Every sweep of the last 20 candles was 9,408 trades and lost $53,488 a micro contract; without costs it was up $1,412. Waiting for a fair value gap first: 1,478 trades, 38.4% won, about even. Copy the script, or run your own version free.

See all 1,478 trades free
  • The full Pine script, free to copy
  • All 14 versions, with every trade
  • Run opens it on MNQ with the backtest done: free account, no card
Sweep + fair value gap · 20 candles, 2RMNQ1! · 5-minute · 23 October 2024 → 22 October 2026
Net, a contract
−$341
Trades
1,478
Won
38.4%
Profit factor
1.00
First 16 months+$5,239
Last 8 months−$5,580
Oct 2024Feb 2026Oct 2026

The $50,000 account after each of its 1,478 trades: one micro contract a trade, $2.50 a contract each side and a tick of slippage.

  • Checked 6 November 2026
  • CME data, 23 October 2024 → 22 October 2026 · 2 years · 517 sessions
  • $2.50 a contract each side + 1 tick of slippage
  • One micro contract a trade, flat by 15:55 New York
  • last third: 24 February 2026 → 22 October 2026 · 8 months
  • Updated 8 November 2026

Every sweep lost in 7 of 7. With a gap check, 1 of 7 made money

Each version over the two years: the last 20, 50 or 100 candles' high or low, a 1R or a 2R target, on MNQ, and one of each on MES.

Every sweep0 of 7 made money
Sweep, then a fair value gap1 of 7 made money

Each square is one version over the two years, after costs: green made money, red lost it. The gap check is a fair value gap in the reversal's direction within three candles of the sweep.

14 versions · MNQ and MES · 5-minute candles · 517 sessions
Made money over two years
1 of 14
23 October 2024 → 22 October 2026
Made money in the last 8 months
0 of 14
24 February 2026 → 22 October 2026 · 8 months
Fees on every sweep
−$54,900
9,408 trades, MNQ, 20 candles, 2R
Win rate with the gap, 2R
38.4%
1,478 trades, profit factor 1.00

The script

Every run used it; change the inputs at the top to run any other row. Copy it into TradingView, or press Run and it opens in the terminal with its backtest done.

Liquidity sweep reversal with a fair value gap check, 20 candles, 2R

A candle that takes out the last 20 candles' low and closes back above it is a sweep; with the gap check on, the entry waits up to three candles for a fair value gap in the reversal's direction. The stop sits a tick beyond the sweep's wick and the target twice the risk away. Entries 02:00 to 15:30 New York, one trade at a time, flat at 15:55.

Trades
1,478
Won
38.4%
Profit factor
1.00
Net
−0.7%
Worst drawdown
−19.7%
Worst trade
−$636

MNQ1! · 5-minute · 23 October 2024 → 22 October 2026 · 2 years · 517 sessions · $2.50 a contract each side, one tick of slippage, one micro contract a trade

Pine Script v6 · 58 linesRun this script
//@version=6
// Suggested timeframe: 5-minute
strategy("Liquidity sweep reversal (20 candles, gap check, 2R)", 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)

// A candle that takes out the last N candles' low and closes back above it is a sweep of the sell
// side; its mirror takes out their high and closes back below. With the gap check on, the entry
// waits for a fair value gap in the reversal's direction within three candles. The entry is the
// next open, the stop a tick beyond the sweep's wick and the target a fixed multiple of the risk.
// Entries from 02:00 to 15:30 New York, one trade at a time; a trade still open is closed at 15:55.
tradeHours = input.session("0200-1530", "Entries (New York)")
look = input.int(20, "Liquidity: the last N candles' high or low", minval=2)
needGap = input.bool(true, "Wait for a fair value gap after the sweep")
rr = input.float(2.0, "Target, times the risk", minval=0.5, step=0.5)

nyMins = hour(time, "America/New_York") * 60 + minute(time, "America/New_York")
inHours = not na(time(timeframe.period, tradeHours, "America/New_York"))
lo = ta.lowest(low, look)[1]
hi = ta.highest(high, look)[1]
sweepLow = low < lo and close > lo
sweepHigh = high > hi and close < hi

// the last sweep's wick and how many candles ago it printed
var float longWick = na
var float shortWick = na
var int longAge = 99
var int shortAge = 99
longAge += 1
shortAge += 1
if sweepLow
    longWick := low
    longAge := 0
if sweepHigh
    shortWick := high
    shortAge := 0

bullGap = low > high[2]
bearGap = high < low[2]
goLong = needGap ? (bullGap and longAge >= 1 and longAge <= 3) : sweepLow
goShort = needGap ? (bearGap and shortAge >= 1 and shortAge <= 3) : sweepHigh

if strategy.position_size == 0 and inHours
    if goLong and not na(longWick)
        stp = longWick - syminfo.mintick
        strategy.entry("Long", strategy.long)
        strategy.exit("Long exit", "Long", stop=stp, limit=close + rr * (close - stp))
        longAge := 99
    else if goShort and not na(shortWick)
        stp = shortWick + syminfo.mintick
        strategy.entry("Short", strategy.short)
        strategy.exit("Short exit", "Short", stop=stp, limit=close - rr * (stp - close))
        shortAge := 99

if strategy.position_size != 0 and nyMins >= 955 and nyMins < 965
    strategy.close_all(comment="Flat by the close")

plotshape(sweepLow, "Sell-side sweep", shape.triangleup, location.belowbar, color.new(#16A56A, 0), size=size.tiny)
plotshape(sweepHigh, "Buy-side sweep", shape.triangledown, location.abovebar, color.new(#E5484D, 0), size=size.tiny)

What Run opens

The Alpha Charts terminal with this page's script already on MNQ1! 5-minute. These are its own screens from that run.

The terminal's chat with the liquidity sweep script read, put on the chart and backtested, and its reply
It lands on MNQ 5-minute and runs. The Copilot reads the script, puts it on the chart and runs the backtest. Ask it why a trade went the way it did, or tell it what to change: it edits the script and runs it again.
The terminal's results for the liquidity sweep script, with the months it held back
The results, with the months it never saw. The terminal holds back the last 6 months by default and says whether the result survived them.

Run your version free

Change the lookback, the gap check or the target, or paste your own sweep setup. It runs on the same CME data with the same costs, and every trade is on the chart.

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

Paid plans add more AI, the optimiser and the rest of the desk, each with 30 days money back. See the plans

The short answer

Taking every liquidity sweep lost, and costs were most of it. Every sweep of the last 20 candles on MNQ was 9,408 trades in two years: +$1,412 a micro contract with no costs, −$53,488 after $2.50 a side and a tick of slippage. All 7 every-sweep versions lost, between $27,644 and $60,036.

Waiting for a fair value gap after the sweep cut the trades by about six times and took the result to about even: with a 2R target the 20, 50 and 100-candle versions came to −$341, +$544 and −$324. The 20-candle one made $5,239 in the first 16 months and lost $5,580 in the 8 months after.

Two years of one setup on two markets, with the rules fixed before the runs and no setting tuned on the last eight months. Price results after modelled costs, not a forecast.

The rules

The same script in every run; only the lookback, the gap check, the target and the market change.

  1. The sweep: a candle that takes out the last 20, 50 or 100 candles' low and closes back above it (long), or their high and closes back below it (short).
  2. The gap check, when on: a fair value gap in the reversal's direction within three candles of the sweep, the entry on the candle after it.
  3. The entry: the next open, from 02:00 to 15:30 New York, one trade at a time.
  4. The stop: a tick beyond the sweep's wick. The target: 1 or 2 times the risk.
  5. One micro contract a trade, flat at 15:55 New York.

All 14 versions

Dollars a contract after costs, with the last 8 months shown first. They are 24 February 2026 → 22 October 2026 · 8 months.

VersionLast 8 monthsFirst 16 monthsTwo yearsTradesWonProfit factor
MNQ · 20 candles · 1R−$18,544−$40,844−$59,38810,12247.9%0.73
MNQ · 20 candles · 2R−$16,640−$36,848−$53,4889,40833.1%0.81
MNQ · 50 candles · 1R−$12,574−$24,899−$37,4746,83948.7%0.76
MNQ · 50 candles · 2R−$10,972−$21,960−$32,9326,65433.6%0.84
MNQ · 100 candles · 1R−$10,524−$19,753−$30,2775,34748.8%0.76
MNQ · 100 candles · 2R−$8,664−$18,980−$27,6445,29033.4%0.83
MES · 20 candles · 2R−$18,511−$41,525−$60,0368,09932.5%0.61
MNQ · 20 candles · gap · 1R−$5,352−$1,814−$7,1651,65852.5%0.92
MNQ · 20 candles · gap · 2R−$5,580+$5,239−$3411,47838.4%1.00
MNQ · 50 candles · gap · 1R−$4,350−$956−$5,3061,19751.9%0.93
MNQ · 50 candles · gap · 2R−$4,338+$4,882+$5441,15037.8%1.01
MNQ · 100 candles · gap · 1R−$2,699−$3,714−$6,41493951.9%0.89
MNQ · 100 candles · gap · 2R−$1,972+$1,648−$32492138.4%1.00
MES · 100 candles · gap · 2R−$2,840−$2,179−$5,01975435.7%0.84

Costs are why every sweep loses

The same two scripts with no commission and no slippage, and with them.

VersionNo costsWith costs
Every sweep, 20 candles, 2R · 9,408 trades+$1,412−$53,488
Sweep + gap, 100 candles, 2R · 921 trades+$5,066−$324

Year by year

Sweep + fair value gap · 20 candles, 2R on MNQ1! 5-minute, in dollars a contract from its trade list.

YearTradesResult
2024 (from 23 Oct)130−$2,696
2025712+$8,657
2026 (to 22 Oct)636−$6,302

Test your own version, free

Run this script and change it in the terminal, or paste your own setup into the free NQ futures backtester. The same CME data and per-contract costs, the same check on the last third and every trade on the chart. No card.

More ICT setups, tested the same way

Each on the same two years of CME data, with every version and the months it never saw.

Questions

Does the liquidity sweep strategy work?

Not as an every-sweep entry. All 7 versions that took every sweep lost after costs, between $27,644 and $60,036 a micro contract over two years. With a fair value gap check first, 1 of 7 made money, and the 2R versions came to about even.

What is the liquidity sweep strategy's win rate?

About 33% with a 2R target and 48% with 1R when every sweep is taken, and about 38% and 52% with the gap check. A 2R target needs a third of its trades to win before costs; the gap check got there, then costs took the rest.

Why does trading every liquidity sweep lose?

Costs. A sweep of the last 20 candles prints many times a day: 9,408 trades in two years on MNQ. With no commission and no slippage those trades made $1,412; at $2.50 a side and a tick of slippage they lost $53,488.

Does a fair value gap confirmation help?

Yes, mostly by cutting trades. It took the 20-candle, 2R version from 9,408 trades to 1,478 and from −$53,488 to −$341, with the win rate up from 33.1% to 38.4%. It still lost $5,580 in the last 8 months.

Does the liquidity sweep work on ES?

Not in this test. On MES, every 20-candle sweep lost $60,036 a micro contract and the 100-candle sweep with the gap check lost $5,019.

Can I run the liquidity sweep on my own settings?

Yes. The script is on this page; Run this script opens the Alpha Charts terminal on MNQ 5-minute with the script on the chart and its backtest done. Change the lookback, the gap check or the target at the top, or paste your own strategy, and see every trade on the chart. A free account runs as many tests as you like, no card.

Every number here is the output of the Alpha Charts backtest engine on 6 November 2026, on CME futures data. Past results are not a forecast and nothing here is investment advice. ICT and its terms are Michael J. Huddleston's; TradingView and Pine Script belong to TradingView, Inc. Alpha Charts is not affiliated with either.

The liquidity sweep scriptFree account, no cardRun it free