BACKTEST RESULTS

VWAP strategy backtest results

SPY 5-minute data, 2024 to 2026: the 2-candle confirm, 1.5 ATR stop rule, long and short, lost 98.3% after costs over 2919 trades, winning 10.8% of them, against +44.4% for holding SPY. Long only it lost 85.8%. The least bad of 6 runs was 2-candle confirm, 1.5 ATR stop on QQQ, long only: -88.4%, held-out did not survive. Every run, every trade and the script are on this page.

SPY · 5-minute data · 2-candle confirm, 1.5 ATR stop · long and short
Net after costs
-98.3%
Holding SPY
+44.4%
Trades
2919
Win rate
10.8%
Profit factor
0.32
Max drawdown
98.3%
Held out, last third: did not survive
Long only: -85.8% on 1449 trades, held-out did not survive
4 June 2024 to 23 October 2026
  • Checked 25 October 2026
  • Alpaca 5-minute data from the last 600 sessions, and 1-minute data from the last 120 sessions
  • 0.05% commission + 0.025% slippage per fill
  • last third of the history held out
  • 6 runs, 12354 trades
  • Updated 1 November 2026

The short answer

Answers here: Does trading the VWAP reclaim work? · What is its win rate? · 1-minute or 5-minute charts?

SPY 5-minute data, 4 June 2024 to 23 October 2026, long and short: 2919 trades, lost 98.3% after costs, 10.8% of trades won, profit factor 0.32, worst drawdown 98.3%, 62% of the time in the market. Holding SPY returned +44.4% over the same period.

Held out on its own, the last third (8 January 2026 to 23 October 2026) lost 78.2% on 979 trades: it did not survive its held-out period.

Long only, the same rule lost 85.8% on 1449 trades (11.1% won, profit factor 0.35, held-out did not survive): the short side cost 12.6 points of return in a period when SPY rose 44.4%.

2919 trades in 2.4 years is about 1226 a year; at 0.15% a round trip, costs alone came to roughly 438% of the account over the period. On minute charts the cost of trading is the first thing a rule has to beat, before any indicator.

Across all 6 runs on this page, 0 made money after costs, 0 survived the held-out third, and 0 beat holding the symbol (1 had too few trades to judge).

The least bad run was 2-candle confirm, 1.5 ATR stop on QQQ, long only: -88.4% net on 1428 trades, profit factor 0.38, worst drawdown 88.4%, held-out did not survive. The tester's verdict on it reads "lost money on this data".

One symbol's past after modelled costs is not a forecast. Prices are split-adjusted and not dividend-adjusted, so every return here is a price return; the period is the last two and a half years of sessions, one market regime, and a rule tested on it can look different in the next one. These are research results, not investment advice.

What the script does

VWAP Reclaim Strategy, from the strategy library.

VWAP reclaim on intraday charts: after at least two candles closing below the session VWAP, a close back above it goes long; after two candles above, a close back below goes short. A stop sits 1.5 ATR away and every trade is closed by 15:55 New York time. The data comes from the last 600 sessions for 5-minute runs and the last 120 for 1-minute runs.

The indicator itself, with its Pine code drawn on real market data: VWAP.

The numbers, run by run

Net and holding the symbol are after costs over the same period. Held-out is the verdict on the last third of the history judged alone: survived, decayed, did not survive, or too few trades to judge.

SymbolTimeframeSettingsDirectionTradesWin rateNetHoldingProfit factorMax drawdownHeld-out
SPY5-minute2-candle confirm, 1.5 ATR stoplong and short291910.8%-98.3%+44.4%0.3298.3%did not survive
QQQ5-minute2-candle confirm, 1.5 ATR stoplong and short292212.0%-99.1%+55.8%0.3599.1%did not survive
SPY5-minute3-candle confirm, 1.5 ATR stoplong and short231910.5%-96.0%+44.4%0.3396.0%did not survive
SPY1-minute2-candle confirm, 1.5 ATR stoplong and short13175.7%-86.8%+5.2%0.0986.8%did not survive
SPY5-minute2-candle confirm, 1.5 ATR stoplong only144911.1%-85.8%+44.4%0.3585.9%did not survive
QQQ5-minute2-candle confirm, 1.5 ATR stoplong only142813.6%-88.4%+55.8%0.3888.4%did not survive

Year by year

2-candle confirm, 1.5 ATR stop on SPY, long and short, the same rule long only, and SPY itself, each calendar year after costs. A partial first or last year counts the sessions it has.

Year2-candle confirm, 1.5 ATR stop, long and short2-candle confirm, 1.5 ATR stop, long onlyHolding SPY
2024-63.1%-36.1%+11.4%
2025-78.4%-51.4%+16.0%
2026-78.9%-54.2%+11.0%

Every trade

The newest 400 of the 2919 trades of 2-candle confirm, 1.5 ATR stop on SPY, long and short, oldest first: side, entry and exit days, fill prices after slippage, and the return after both commissions. The other runs' trades open below.

SideInOutEntryExitReturn
short2026-06-262026-06-26732.64733.66-0.2%
long2026-06-262026-06-26733.47731.87-0.3%
short2026-06-292026-06-29736.68737.59-0.2%
long2026-06-292026-06-30737.59741.09+0.4%
short2026-06-302026-06-30741.11741.66-0.2%
short2026-07-012026-07-01742.43743.93-0.3%
long2026-07-012026-07-01743.89746.28+0.2%
short2026-07-012026-07-01746.28747.06-0.2%
short2026-07-012026-07-02746.45747.60-0.3%
long2026-07-022026-07-02748.74749.460.0%
short2026-07-022026-07-06749.46748.890.0%
short2026-07-062026-07-06748.11748.82-0.2%
short2026-07-062026-07-06748.34749.01-0.2%
long2026-07-062026-07-07749.01750.07+0.0%
short2026-07-072026-07-07749.26750.36-0.2%
long2026-07-072026-07-07750.36749.39-0.2%
long2026-07-072026-07-07747.87747.29-0.2%
short2026-07-072026-07-08747.58743.36+0.5%
long2026-07-082026-07-08743.86743.43-0.2%
short2026-07-082026-07-08743.43744.21-0.2%
long2026-07-082026-07-08744.21743.59-0.2%
long2026-07-082026-07-09742.78747.13+0.5%
short2026-07-092026-07-09747.36748.06-0.2%
long2026-07-092026-07-10748.06751.85+0.4%
short2026-07-102026-07-10752.02753.14-0.2%
short2026-07-102026-07-10752.50752.30-0.1%
long2026-07-102026-07-10752.30750.98-0.3%
short2026-07-102026-07-10750.98752.13-0.3%
long2026-07-102026-07-13752.13752.27-0.1%
short2026-07-132026-07-13753.02753.83-0.2%
long2026-07-132026-07-13753.83752.48-0.3%
long2026-07-132026-07-13753.47752.06-0.3%
short2026-07-132026-07-13752.45752.94-0.2%
long2026-07-132026-07-13752.94752.14-0.2%
long2026-07-142026-07-14751.38750.24-0.3%
short2026-07-142026-07-14750.24750.91-0.2%
long2026-07-142026-07-14750.91750.81-0.1%
short2026-07-142026-07-14750.81751.41-0.2%
long2026-07-142026-07-15751.41754.04+0.3%
short2026-07-152026-07-15754.66754.72-0.1%
long2026-07-152026-07-15754.72753.17-0.3%
short2026-07-152026-07-15753.60754.84-0.3%
short2026-07-152026-07-15753.47753.60-0.1%
long2026-07-152026-07-15753.60753.14-0.2%
short2026-07-152026-07-15753.14753.87-0.2%
long2026-07-152026-07-15753.87753.13-0.2%
short2026-07-152026-07-15753.13753.83-0.2%
short2026-07-162026-07-16752.00752.10-0.1%
long2026-07-162026-07-16752.10752.550.0%
short2026-07-162026-07-17752.55742.25+1.3%
long2026-07-172026-07-17741.70740.85-0.2%
short2026-07-172026-07-17744.03745.08-0.2%
short2026-07-172026-07-20744.69747.26-0.4%
long2026-07-202026-07-20748.23747.38-0.2%
short2026-07-202026-07-20747.38746.43+0.0%
long2026-07-202026-07-20746.43745.80-0.2%
short2026-07-202026-07-20745.62746.53-0.2%
long2026-07-212026-07-21745.58744.99-0.2%
short2026-07-212026-07-21744.99745.92-0.2%
short2026-07-222026-07-22747.43748.13-0.2%
long2026-07-222026-07-22748.13748.32-0.1%
short2026-07-222026-07-23748.32739.54+1.1%
long2026-07-232026-07-23741.50740.17-0.3%
short2026-07-232026-07-23740.17741.15-0.2%
long2026-07-232026-07-23740.58738.67-0.4%
long2026-07-232026-07-23739.64737.83-0.3%
short2026-07-232026-07-23737.83739.17-0.3%
long2026-07-232026-07-23739.17738.55-0.2%
short2026-07-242026-07-24738.91740.00-0.2%
long2026-07-242026-07-24740.00738.44-0.3%
long2026-07-242026-07-24739.46738.34-0.3%
short2026-07-242026-07-24738.34739.75-0.3%
short2026-07-242026-07-24738.15739.20-0.2%
long2026-07-242026-07-24739.20740.00+0.0%
short2026-07-242026-07-27740.00745.07-0.8%
long2026-07-272026-07-27744.86743.28-0.3%
short2026-07-272026-07-27743.28739.49+0.4%
long2026-07-272026-07-27739.49738.91-0.2%
short2026-07-272026-07-28738.80739.43-0.2%
long2026-07-282026-07-28737.91737.05-0.2%
short2026-07-292026-07-29739.47736.09+0.4%
long2026-07-292026-07-29736.09735.21-0.2%
short2026-07-292026-07-30735.18736.24-0.2%
long2026-07-302026-07-30736.58737.030.0%
short2026-07-302026-07-30737.03737.27-0.1%
long2026-07-302026-07-31737.27744.48+0.9%
short2026-07-312026-07-31743.93741.80+0.2%
long2026-07-312026-07-31741.80740.82-0.2%
short2026-07-312026-07-31740.82742.26-0.3%
long2026-07-312026-07-31742.26741.22-0.2%
short2026-07-312026-07-31741.22742.98-0.3%
short2026-08-052026-08-05775.20776.87-0.3%
long2026-08-052026-08-05776.87774.85-0.4%
short2026-08-052026-08-06775.48770.41+0.6%
long2026-08-062026-08-06770.68770.25-0.2%
short2026-08-062026-08-06770.25770.98-0.2%
long2026-08-062026-08-06771.20770.08-0.2%
long2026-08-062026-08-06769.53768.91-0.2%
short2026-08-062026-08-06768.91769.76-0.2%
long2026-08-062026-08-06769.76768.97-0.2%
short2026-08-062026-08-07768.97771.22-0.4%
long2026-08-072026-08-07771.70770.93-0.2%
short2026-08-072026-08-07770.87772.03-0.3%
long2026-08-072026-08-07772.03771.54-0.2%
short2026-08-072026-08-07771.54772.48-0.2%
long2026-08-072026-08-07772.48771.76-0.2%
short2026-08-072026-08-07771.76772.46-0.2%
long2026-08-072026-08-07772.46771.86-0.2%
long2026-08-072026-08-07772.59771.95-0.2%
short2026-08-072026-08-07771.95772.87-0.2%
long2026-08-072026-08-10772.87772.44-0.2%
short2026-08-102026-08-10772.43773.33-0.2%
long2026-08-102026-08-10773.33773.31-0.1%
short2026-08-102026-08-10773.31774.02-0.2%
long2026-08-102026-08-10774.02773.56-0.2%
short2026-08-102026-08-10773.56774.01-0.2%
long2026-08-102026-08-10774.01773.37-0.2%
short2026-08-102026-08-10773.47773.59-0.1%
long2026-08-102026-08-10773.59773.10-0.2%
long2026-08-102026-08-10773.59772.69-0.2%
long2026-08-112026-08-11773.82773.19-0.2%
short2026-08-112026-08-11773.19774.08-0.2%
short2026-08-112026-08-11773.17774.08-0.2%
long2026-08-112026-08-11774.08773.31-0.2%
short2026-08-112026-08-12773.31774.91-0.3%
long2026-08-122026-08-12773.74772.42-0.3%
long2026-08-122026-08-12773.14772.59-0.2%
long2026-08-122026-08-12772.98772.48-0.2%
short2026-08-122026-08-12772.48772.78-0.1%
long2026-08-122026-08-12772.78772.25-0.2%
long2026-08-122026-08-12772.96772.06-0.2%
short2026-08-122026-08-13772.06772.89-0.2%
long2026-08-132026-08-13775.59777.17+0.1%
short2026-08-132026-08-13777.17777.20-0.1%
long2026-08-132026-08-13777.20776.73-0.2%
short2026-08-132026-08-13776.73777.28-0.2%
long2026-08-132026-08-13777.28776.73-0.2%
long2026-08-132026-08-14777.45778.34+0.0%
short2026-08-142026-08-14777.97778.59-0.2%
long2026-08-142026-08-14778.59777.76-0.2%
short2026-08-142026-08-17777.61776.38+0.1%
long2026-08-172026-08-17776.18775.15-0.2%
short2026-08-172026-08-17775.07775.86-0.2%
long2026-08-172026-08-17775.86775.15-0.2%
long2026-08-172026-08-17775.70775.17-0.2%
long2026-08-172026-08-17775.90775.04-0.2%
short2026-08-172026-08-17775.04775.71-0.2%
long2026-08-172026-08-17775.71775.10-0.2%
short2026-08-172026-08-18775.10768.90+0.7%
long2026-08-182026-08-18769.31768.53-0.2%
long2026-08-182026-08-18769.16768.34-0.2%
long2026-08-182026-08-18769.02768.19-0.2%
short2026-08-182026-08-18768.19768.68-0.2%
long2026-08-182026-08-18768.68768.15-0.2%
long2026-08-182026-08-18768.65768.18-0.2%
short2026-08-182026-08-18768.10768.61-0.2%
long2026-08-182026-08-18768.61768.07-0.2%
long2026-08-192026-08-19770.31768.97-0.3%
long2026-08-192026-08-19770.22769.43-0.2%
short2026-08-192026-08-19769.91770.84-0.2%
short2026-08-192026-08-19770.19770.38-0.1%
long2026-08-192026-08-19770.38769.28-0.2%
long2026-08-202026-08-20767.26766.79-0.2%
short2026-08-202026-08-20766.79766.97-0.1%
long2026-08-202026-08-20766.97766.01-0.2%
long2026-08-202026-08-20767.16766.32-0.2%
short2026-08-202026-08-20766.32766.83-0.2%
long2026-08-202026-08-20766.83766.18-0.2%
long2026-08-212026-08-21765.36764.77-0.2%
long2026-08-212026-08-21765.46764.50-0.2%
long2026-08-212026-08-21765.24765.32-0.1%
short2026-08-212026-08-21765.32766.09-0.2%
long2026-08-212026-08-21766.09765.18-0.2%
long2026-08-242026-08-24763.67762.78-0.2%
short2026-08-242026-08-24762.78763.82-0.2%
long2026-08-242026-08-24763.82762.86-0.2%
short2026-08-242026-08-24762.86764.21-0.3%
long2026-08-242026-08-24763.94763.37-0.2%
short2026-08-242026-08-24763.37764.10-0.2%
long2026-08-242026-08-24764.10763.45-0.2%
short2026-08-242026-08-24763.45763.98-0.2%
long2026-08-242026-08-25763.98765.97+0.2%
long2026-08-252026-08-25766.66765.83-0.2%
long2026-08-252026-08-25765.52764.88-0.2%
long2026-08-252026-08-25765.41764.92-0.2%
short2026-08-252026-08-25764.92765.61-0.2%
long2026-08-252026-08-25765.61764.82-0.2%
long2026-08-252026-08-25765.55764.92-0.2%
short2026-08-252026-08-25764.92765.45-0.2%
long2026-08-252026-08-26765.45764.48-0.2%
short2026-08-262026-08-26765.76766.07-0.1%
long2026-08-262026-08-26766.07765.57-0.2%
short2026-08-262026-08-26765.57766.27-0.2%
long2026-08-262026-08-26766.27765.11-0.3%
short2026-08-262026-08-26765.19765.85-0.2%
long2026-08-262026-08-26765.85765.27-0.2%
short2026-08-262026-08-26765.27765.97-0.2%
short2026-08-262026-08-26765.32765.98-0.2%
short2026-08-272026-08-27767.28768.43-0.2%
short2026-08-272026-08-27767.87769.45-0.3%
short2026-08-272026-08-27769.27770.25-0.2%
long2026-08-272026-08-27770.25769.69-0.2%
long2026-08-272026-08-27770.15769.70-0.2%
short2026-08-272026-08-27769.70770.38-0.2%
short2026-08-282026-08-28771.99773.17-0.3%
long2026-08-282026-08-28771.79771.10-0.2%
short2026-08-282026-08-31772.09767.53+0.5%
long2026-08-312026-08-31766.68765.99-0.2%
long2026-08-312026-08-31766.23765.75-0.2%
long2026-08-312026-08-31766.26765.22-0.2%
long2026-08-312026-08-31766.09765.62-0.2%
long2026-08-312026-08-31766.11765.59-0.2%
short2026-08-312026-08-31765.59766.04-0.2%
long2026-08-312026-08-31766.04765.26-0.2%
short2026-08-312026-08-31765.26766.23-0.2%
long2026-08-312026-09-01766.23761.83-0.7%
short2026-09-012026-09-01761.56762.16-0.2%
short2026-09-012026-09-01761.62762.22-0.2%
short2026-09-012026-09-01762.58763.14-0.2%
short2026-09-012026-09-02762.81762.63-0.1%
long2026-09-022026-09-02762.60761.88-0.2%
short2026-09-022026-09-02761.88762.66-0.2%
short2026-09-022026-09-02764.20765.11-0.2%
long2026-09-022026-09-03765.11767.66+0.2%
short2026-09-032026-09-03767.92769.41-0.3%
long2026-09-032026-09-04769.46771.81+0.2%
short2026-09-042026-09-04772.27772.71-0.2%
long2026-09-042026-09-04772.71772.12-0.2%
short2026-09-042026-09-04772.12771.08+0.0%
long2026-09-042026-09-04771.08770.46-0.2%
short2026-09-042026-09-08770.25769.26+0.0%
long2026-09-082026-09-08767.84767.31-0.2%
short2026-09-082026-09-08767.31768.20-0.2%
long2026-09-082026-09-08767.86767.12-0.2%
long2026-09-082026-09-08768.10767.29-0.2%
short2026-09-082026-09-08767.29767.88-0.2%
short2026-09-082026-09-08767.14767.77-0.2%
short2026-09-082026-09-08767.28767.81-0.2%
short2026-09-082026-09-08766.99767.72-0.2%
long2026-09-092026-09-09764.32763.63-0.2%
long2026-09-092026-09-09764.08763.58-0.2%
short2026-09-092026-09-09762.84764.17-0.3%
long2026-09-092026-09-09764.17763.29-0.2%
long2026-09-092026-09-09763.95762.52-0.3%
short2026-09-092026-09-09762.68763.35-0.2%
long2026-09-092026-09-09763.35762.25-0.2%
short2026-09-092026-09-09762.25763.11-0.2%
short2026-09-092026-09-09762.56763.15-0.2%
long2026-09-092026-09-09763.15762.57-0.2%
short2026-09-092026-09-09762.57763.22-0.2%
short2026-09-092026-09-09762.49763.28-0.2%
short2026-09-092026-09-10762.57758.22+0.5%
long2026-09-102026-09-10758.62757.16-0.3%
short2026-09-102026-09-10757.15758.22-0.2%
long2026-09-102026-09-10758.22757.88-0.1%
short2026-09-102026-09-10757.88759.03-0.3%
long2026-09-102026-09-10759.03757.86-0.3%
short2026-09-102026-09-11757.86764.89-1.0%
long2026-09-112026-09-11765.96764.79-0.3%
short2026-09-112026-09-11764.79766.51-0.3%
long2026-09-112026-09-11766.51765.20-0.3%
short2026-09-112026-09-11765.20765.92-0.2%
long2026-09-112026-09-11765.92764.53-0.3%
short2026-09-112026-09-11764.53765.59-0.2%
long2026-09-112026-09-11765.59764.74-0.2%
short2026-09-112026-09-11764.74765.78-0.2%
short2026-09-112026-09-11765.17765.66-0.2%
long2026-09-112026-09-11765.66765.10-0.2%
long2026-09-142026-09-14759.63758.62-0.2%
short2026-09-142026-09-14758.62759.74-0.2%
long2026-09-142026-09-15759.74759.93-0.1%
long2026-09-152026-09-15760.00759.15-0.2%
short2026-09-152026-09-15759.15759.86-0.2%
short2026-09-152026-09-15758.61758.180.0%
long2026-09-152026-09-15758.18757.54-0.2%
long2026-09-152026-09-15757.98757.37-0.2%
long2026-09-162026-09-16760.09759.08-0.2%
short2026-09-162026-09-16759.08760.04-0.2%
long2026-09-162026-09-16760.04759.50-0.2%
short2026-09-162026-09-16759.50760.29-0.2%
long2026-09-162026-09-16760.29759.69-0.2%
long2026-09-162026-09-16760.38759.50-0.2%
short2026-09-162026-09-17759.75763.35-0.6%
long2026-09-172026-09-17761.68761.05-0.2%
short2026-09-172026-09-17761.05761.65-0.2%
long2026-09-172026-09-18761.65761.11-0.2%
short2026-09-182026-09-18760.86760.170.0%
long2026-09-182026-09-18760.17759.58-0.2%
long2026-09-182026-09-18759.90759.45-0.2%
short2026-09-182026-09-18759.45759.99-0.2%
short2026-09-222026-09-22774.40774.30-0.1%
long2026-09-222026-09-22774.30773.30-0.2%
long2026-09-232026-09-23770.57769.63-0.2%
short2026-09-232026-09-24769.63764.27+0.6%
long2026-09-242026-09-24764.90764.68-0.1%
short2026-09-242026-09-24764.68766.14-0.3%
long2026-09-242026-09-24767.05765.50-0.3%
short2026-09-242026-09-24765.50766.97-0.3%
short2026-09-252026-09-25767.39768.97-0.3%
long2026-09-252026-09-25768.97768.01-0.2%
short2026-09-252026-09-25768.01769.68-0.3%
long2026-09-252026-09-28770.15768.18-0.4%
short2026-09-282026-09-28767.53768.24-0.2%
long2026-09-282026-09-28768.24767.52-0.2%
short2026-09-282026-09-28767.52766.74+0.0%
long2026-09-282026-09-28766.74766.22-0.2%
short2026-09-282026-09-28766.22767.32-0.2%
short2026-09-282026-09-29766.34767.01-0.2%
long2026-09-292026-09-29766.07764.92-0.2%
long2026-09-292026-09-29765.64764.82-0.2%
short2026-09-292026-09-29764.89765.73-0.2%
long2026-09-292026-09-29765.73764.67-0.2%
long2026-09-292026-09-29765.08763.92-0.3%
short2026-09-292026-09-29763.92764.41-0.2%
short2026-09-302026-09-30766.48767.32-0.2%
short2026-09-302026-09-30767.33767.91-0.2%
short2026-09-302026-09-30767.79768.57-0.2%
long2026-09-302026-09-30768.57767.64-0.2%
long2026-09-302026-09-30768.45767.49-0.2%
short2026-09-302026-10-01767.49764.55+0.3%
long2026-10-012026-10-01764.95763.36-0.3%
short2026-10-012026-10-01763.22761.84+0.1%
long2026-10-012026-10-01761.84761.09-0.2%
short2026-10-012026-10-01760.69762.03-0.3%
long2026-10-012026-10-02762.03770.38+1.0%
short2026-10-022026-10-02769.99771.82-0.3%
long2026-10-022026-10-02771.82770.77-0.2%
short2026-10-022026-10-05770.77769.88+0.0%
long2026-10-052026-10-05771.00770.18-0.2%
short2026-10-052026-10-05770.18770.76-0.2%
short2026-10-062026-10-06777.93778.60-0.2%
short2026-10-062026-10-06778.65779.91-0.3%
long2026-10-062026-10-06779.91779.70-0.1%
short2026-10-062026-10-06779.70780.18-0.2%
long2026-10-062026-10-06780.18779.67-0.2%
long2026-10-062026-10-06780.20779.63-0.2%
long2026-10-062026-10-06780.35779.72-0.2%
short2026-10-062026-10-06779.72780.20-0.2%
long2026-10-062026-10-06780.20779.56-0.2%
short2026-10-062026-10-07779.56775.97+0.4%
long2026-10-072026-10-08775.03774.67-0.1%
short2026-10-082026-10-08774.65775.60-0.2%
long2026-10-082026-10-08775.60774.70-0.2%
short2026-10-082026-10-08774.81776.09-0.3%
long2026-10-082026-10-08775.62774.76-0.2%
short2026-10-082026-10-09774.76776.44-0.3%
short2026-10-092026-10-09775.40776.24-0.2%
long2026-10-092026-10-09776.24775.42-0.2%
long2026-10-092026-10-12776.41778.58+0.2%
short2026-10-122026-10-12778.63779.52-0.2%
long2026-10-122026-10-12778.75777.90-0.2%
short2026-10-122026-10-13777.90777.54-0.1%
short2026-10-132026-10-13777.88777.82-0.1%
long2026-10-132026-10-13777.82777.04-0.2%
short2026-10-132026-10-13777.04777.66-0.2%
long2026-10-132026-10-13777.66776.96-0.2%
short2026-10-132026-10-13776.96777.83-0.2%
long2026-10-132026-10-13778.19777.23-0.2%
short2026-10-132026-10-13777.12777.94-0.2%
short2026-10-142026-10-15774.51766.44+0.9%
long2026-10-152026-10-15767.35765.95-0.3%
short2026-10-152026-10-15765.95767.10-0.3%
long2026-10-152026-10-16767.10773.04+0.7%
short2026-10-162026-10-16772.06772.37-0.1%
long2026-10-162026-10-16772.37770.97-0.3%
short2026-10-162026-10-16771.40772.30-0.2%
long2026-10-162026-10-16772.30771.07-0.3%
short2026-10-162026-10-19771.07767.43+0.4%
long2026-10-192026-10-19768.55767.03-0.3%
short2026-10-192026-10-19767.03767.86-0.2%
long2026-10-192026-10-19767.86768.09-0.1%
short2026-10-192026-10-19768.09768.37-0.1%
long2026-10-192026-10-19768.37767.67-0.2%
short2026-10-192026-10-20767.67766.07+0.1%
long2026-10-202026-10-20765.71764.36-0.3%
short2026-10-202026-10-20764.30765.78-0.3%
short2026-10-202026-10-20768.72770.06-0.3%
short2026-10-202026-10-20768.81769.77-0.2%
long2026-10-202026-10-20769.77768.32-0.3%
short2026-10-202026-10-20768.32769.42-0.2%
long2026-10-202026-10-20769.42768.29-0.2%
short2026-10-202026-10-20768.29769.60-0.3%
long2026-10-202026-10-20769.60768.59-0.2%
short2026-10-202026-10-21768.59771.38-0.5%
long2026-10-212026-10-21771.14769.74-0.3%
short2026-10-212026-10-21769.69770.42-0.2%
long2026-10-212026-10-21770.42771.110.0%
short2026-10-212026-10-21771.11772.42-0.3%
long2026-10-212026-10-22772.38766.17-0.9%
short2026-10-222026-10-22766.42767.31-0.2%
long2026-10-222026-10-22767.31765.95-0.3%
short2026-10-222026-10-22765.95764.98+0.0%
long2026-10-222026-10-22764.98764.01-0.2%
short2026-10-222026-10-22764.01763.77-0.1%
long2026-10-222026-10-23763.77759.70-0.6%
short2026-10-232026-10-23759.79760.79-0.2%
long2026-10-232026-10-23760.79760.04-0.2%
short2026-10-232026-10-23760.04760.61-0.2%
long2026-10-232026-10-23760.61761.060.0%
short2026-10-232026-10-23761.06760.10+0.0%

The script

Pine v6, exactly as it ran for 2-candle confirm, 1.5 ATR stop on SPY, long and short. The variants change only the inputs listed in the table.

//@version=6
strategy("VWAP Reclaim Strategy", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100, initial_capital=100000, commission_type=strategy.commission.percent, commission_value=0.05, slippage=1, margin_long=0, margin_short=0)

src        = input.source(hlc3, "VWAP source", group="Setup")
confirmN   = input.int(2, "Bars on the far side before a reclaim counts", minval=1, group="Setup")
exitHour   = input.int(15, "Flat at hour (exchange time)", minval=0, maxval=23, group="Session")
exitMinute = input.int(55, "Flat at minute", minval=0, maxval=59, group="Session")
useLong    = input.bool(true, "Trade longs", group="Direction")
useShort   = input.bool(true, "Trade shorts", group="Direction")
atrLen     = input.int(14, "ATR length", minval=1, group="Risk")
stopMult   = input.float(1.5, "Stop (ATR multiples, 0 = off)", minval=0, step=0.5, group="Risk")

// the session VWAP, restarted every day
newSession = timeframe.change("D")
var float sumPV = 0.0
var float sumV  = 0.0
if newSession
    sumPV := 0.0
    sumV  := 0.0
sumPV += src * volume
sumV  += volume
vwap = sumV > 0 ? sumPV / sumV : na
atr  = ta.atr(atrLen)

// how many bars price has spent on each side of VWAP
var int belowN = 0
var int aboveN = 0
belowN := close < vwap ? belowN + 1 : 0
aboveN := close > vwap ? aboveN + 1 : 0
intraday = timeframe.isintraday
// the exchange clock, never GMT
flatTime = hour == exitHour and minute >= exitMinute

longSig   = intraday and ta.crossover(close, vwap) and belowN[1] >= confirmN and barstate.isconfirmed
shortSig  = intraday and ta.crossunder(close, vwap) and aboveN[1] >= confirmN and barstate.isconfirmed
exitLong  = ta.crossunder(close, vwap) and barstate.isconfirmed
exitShort = ta.crossover(close, vwap) and barstate.isconfirmed

plot(vwap, "VWAP", color=close > vwap ? color.new(#16A56A, 0) : color.new(#E5484D, 0), linewidth=2)

if longSig and useLong and not flatTime
    strategy.entry("Long", strategy.long)
    strategy.exit("Long stop", "Long", stop=stopMult > 0 ? close - stopMult * atr : na)
if shortSig and useShort and not flatTime
    strategy.entry("Short", strategy.short)
    strategy.exit("Short stop", "Short", stop=stopMult > 0 ? close + stopMult * atr : na)
if exitLong
    strategy.close("Long")
if exitShort
    strategy.close("Short")
if flatTime
    strategy.close_all()

How it was tested

Alpaca 5-minute data from the last 600 sessions, and 1-minute data from the last 120 sessions, 0.05% commission and 0.025% slippage on every fill, the last third of the history held out, textbook settings and nothing tuned. The engine, fills and what it does not model are written out once, in data and methodology.

Run the VWAP strategy on your own symbol, free

Describe the rule in your own words or paste the script. The Free plan writes the Pine v6 script with the AI, runs it on any US stock or ETF with the same costs and the same held-out check, and shows every trade on the chart. No card.

Every strategy tested

Seventeen popular rules through the same engine, the same costs and the same held-out check, with every trade listed. Next: Opening range breakout strategy, Time-of-day strategy, EMA pullback strategy.

Questions

Does the VWAP strategy work?

SPY, 5-minute data, 2024 to 2026, long and short: 2-candle confirm, 1.5 ATR stop lost 98.3% after costs over 2919 trades (10.8% won, profit factor 0.32) against +44.4% for holding SPY, and the held-out third did not survive. Long only it lost 85.8%. Across all 6 runs on the page, 0 made money after costs, 0 survived their held-out third and 0 beat holding the stock.

What is the win rate of the VWAP strategy?

From 5.7% to 13.6% across the 6 runs. The classic setting, 2-candle confirm, 1.5 ATR stop on SPY long and short, won 10.8% of 2919 trades. The win rate alone does not decide the result: that run's profit factor was 0.32, so its losers outweighed its winners, and the net return was -98.3%.

What are the best VWAP settings?

Of the 2 settings tested, 2-candle confirm, 1.5 ATR stop on QQQ (long only) did least badly: -88.4% net, profit factor 0.38, held-out did not survive. That is the best of 6 tries on 2.4 years of 5-minute data of one symbol, which is already a fitted number. A setting that works on one symbol or one period only is a coincidence, not a setting; run it on your own symbol and timeframe before trusting it.

Does the VWAP strategy beat holding the stock?

0 of the 6 runs did. SPY itself returned +44.4% between 4 June 2024 and 23 October 2026, so a rule that is out of the market part of the time has a lot to make up; what a timing rule usually gets you is a smaller drawdown, not a bigger return. The classic run's worst drawdown was 98.3% with 62% of the time in the market.

Did the VWAP strategy hold up out of sample?

The last third of every run's history (8 January 2026 to 23 October 2026 for the lead run) was judged on its own, with no fitting on it: 0 of 6 runs survived, 0 decayed, 6 did not survive and 0 had too few trades there to judge. Survived means a positive Sharpe ratio on the held-out part at least half the fitted period's; it is a check on one later stretch, not a forecast.

How was this tested?

With the free Alpha Charts tester's own engine: the Pine v6 scripts on this page, run on Alpaca 5-minute data from the last 600 sessions, and 1-minute data from the last 120 sessions, split-adjusted and not dividend-adjusted, one position at a time with the whole account, fills at the next candle's open, a commission of 0.05% and slippage of 0.025% on every fill, the last third of the history held out. The settings are the textbook ones and every variant is stated; nothing was tuned to make the page look better.

Every number on this page is the output of the Alpha Charts backtest engine on 25 October 2026, on Alpaca market data; the scripts are the strategy library's templates, shown as they ran. Symbols are US-listed ETFs and stocks; results are price returns after the costs stated. Past results are not a forecast and nothing here is investment advice. TradingView and Pine Script belong to TradingView, Inc.; Alpha Charts is not affiliated with it.