VWAP pullback
A pullback to the session's average price on intraday bars, flat at close: in a stock trading above its average today, buy a dip to within half a percent of it after 10:00, and take the bounce. Nothing is held overnight.
Intraday bars · intraday/vwap_pullback.rvw
language 1
strategy "VWAP pullback" {
universe stocks
filter daily(close) > daily(sma(close, 20))
gap close / vwap - 1
enter long when time >= 10:00 and time < 15:30 and gap > 0 and gap < 0.5% and close < close[1]
rank by -gap
size 10% of equity, max 5 positions
stop 1%
target 1%
flat at close
}
Functions it uses
Try it
These need stocks’ intraday bars, such as 5-minute files converted with rvw convert ohlcv. See Intraday bars.
File ▸ New Script from Example adds it to a project. The examples read the sample’s index label, SYN500, and market ETF, SYNSPY; when your data has neither, a sheet asks what to read instead, one of your index labels (or every stock and ETF) and a ticker, so the example runs on your data as it is.
Before you trust what it does on your data, see whether it’s luck: Is this result luck?