VWAP Suite | Trend & Mean Reversion with Adaptive Filters — Strategy by blitz_locked
By blitz_locked
Performance Metrics
- Author: blitz_locked
- Symbol: NASDAQ:NVDA
- Timeframe: 2 hours
- Win Rate: 79.3%
- Profit Factor: 2.404
Description
OverviewThis strategy is built around a custom volume-weighted average price (VWAP) engine with standard-deviation bands, and gives you two complete, independently-tuned trading modes in a single script:Trend Following — trades breakouts/crossovers in the direction of VWAP's own momentumMean Reversion — trades stretched price extremes back toward VWAP, filtered for low-trend conditionsRather than assuming one style of market behavior, this script lets you choose the mode that matches what you're trading — a trending momentum stock, or a calmer range-bound one — and includes a layered filter system designed to keep you out of low-quality setups in either mode.How VWAP Is CalculatedVWAP weights price by the volume traded at that price, rather than treating all price ticks equally — so it reflects where the real trading activity concentrated, not just a simple average. This script computes it manually (not via a black-box built-in), which allows for flexible anchoring:Session — resets daily (best for lower timeframes, intraday charts)Week — resets weekly (better for 1H–4H charts)Month — resets monthly (for swing/position-style testing)Standard deviation bands are plotted at three levels (1, 2, and 3 std dev by default), giving visual reference points for "normal," "stretched," and "extreme" price deviation from the volume-weighted average.Strategy ModesTrend FollowingLooks for price to break through VWAP (or an outer band) in a direction confirmed by VWAP's own slope — the idea being that VWAP acting as support/resistance and trending in your trade's direction adds conviction to the move.Three selectable entry triggers: VWAP Cross, Band 1 Break, Band 2 BreakVWAP slope filter (with adjustable lookback and minimum slope %) to avoid trading flat/directionless VWAPTake-profit targets at the opposite band or at VWAP itselfBest suited for: momentum-driven, higher-volatility names where trends persist once established.Mean ReversionLooks for price to overextend beyond a chosen band, then trades the snap-back toward VWAP. Includes an ADX filter to specifically avoid taking reversion trades during strongly trending conditions (where "buying the dip" or "fading the rip" is historically much riskier).Three selectable entry triggers: Outside Band, Band Cross, Band Reclaim (wick-and-recover confirmation — the most conservative/false-signal-resistant option)ADX filter caps entries below a configurable trend-strength thresholdMaximum VWAP deviation cap (in ATR units) to avoid catching a falling knife on extreme extensionsBest suited for: range-bound, lower-volatility names where price oscillates predictably around a stable average.Filter System (False-Signal Reduction)Every entry — in either mode — passes through a shared base filter layer before mode-specific logic is applied:Volume Filter: Requires volume above a multiple of its recent average, filtering out low-conviction movesVolatility (ATR) Filter: Requires a minimum ATR (as % of price) to avoid dead, directionless conditionsBand Width Filter: Avoids trading when bands are unusually tight (a sign of indecision and high whipsaw risk)VWAP Slope Filter (Trend mode): Confirms VWAP itself is moving meaningfully in the trade direction, not just flatADX Filter (Mean Reversion mode): Blocks entries when the broader trend is too strong to safely fadeEach filter can be toggled independently, so you can isolate which conditions matter most for the instrument and timeframe you're trading.Optional Confluence LayerA secondary indicator can be layered on top of either mode:RSI — for trend mode, confirms momentum direction; for mean reversion, confirms oversold/overbought exhaustion via a crossover triggerEMA Regime (200-period default) — acts as a higher-level trend filter, only allowing longs above the EMA and shorts below itRisk ManagementRisk-based position sizing — position size is calculated from your risk % input divided by stop distance, not a fixed share countMaximum position size cap (% of equity) — acts as a hard ceiling so tight-stop trades can't produce oversized positionsTwo stop-loss methods — ATR-multiple based, or band-based (using the outer bands as structural stop references)Two take-profit methods — opposite band target, or VWAP itselfOptional fixed take-profit lock — freezes the target price at entry rather than letting it drift with VWAPOptional break-even stop — moves the stop to entry once a configurable ATR-multiple of profit is reachedVisualsVWAP line color-shifts between two colors depending on whether price is above or below itThree-tier shaded band system for at-a-glance visual reference of price deviationEntry markers (triangle up/down) plotted directly on signal barsBackground shading during filtered/no-trade conditions, so you can visually see why the strategy stayed flatImportant Notes Before UseMatch your anchor period to your timeframe. Session anchoring is built for intraday charts; on higher timeframes (2H+), Week or Month anchoring will produce more reliable slope readings, since Session resets can occur every few bars and distort trend measurement.Backtest results include commission assumptions but not slippage — adjust the commission/slippage settings in the strategy properties to reflect your actual broker before drawing conclusions from performance metrics.This script is provided for research and educational purposes. Past performance in backtesting does not guarantee future results. Always forward-test on a paper account before committing real capital.