Rolling VWAP Mean Reversion with Deviation Bands
Summary
This strategy uses a rolling volume-weighted average price (RVWAP) with standard-deviation bands to define potential mean-reversion entries. The RVWAP is calculated over a configurable time window using volume-weighted prices; users can select a fixed duration or an automatic duration based on chart timeframe. A minimum bar count helps preserve a usable calculation across gaps, and the script requires volume data.
For longs, the strategy enters when price crosses above the lower band and closes when the high crosses above the RVWAP. For shorts, it enters when price crosses below the upper band and closes when the low crosses below the RVWAP. Long and short sides and a date filter can be enabled or disabled. The script supplies indicator calculations and trading rules, not performance evidence. Its effectiveness may depend on the selected window, band multiplier, instrument, and timeframe; the document does not assess those choices or discuss execution costs.
Key ideas
- The rolling VWAP weights recent source prices by volume within a selected time window.
- Standard-deviation bands express price distance from the rolling VWAP using local weighted dispersion.
- A long entry follows a cross above the lower band, with an exit on a cross above the VWAP.
- A short entry follows a cross below the upper band, with an exit on a cross below the VWAP.
- The script requires volume data and provides no reported performance evaluation.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.