OPEN-SOURCE SCRIPT
VWAP Mean Reversion Scalper with Multi-SD Bands and CVD

The VWAP Mean Reversion Scalper is an execution-focused indicator designed to identify potential price exhaustion points at statistical extremes. It utilizes a Volume Weighted Average Price (VWAP) core with multiple standard deviation bands to define overextended market conditions, confirmed by real-time Volume Delta (CVD).
How It Works (Technical Logic)
This script identifies reversal setups based on the convergence of three primary data points:
Statistical Extremes (VWAP SD Bands): The indicator calculates three standard deviation bands based on the VWAP. These bands serve as dynamic "overbought" and "oversold" zones.
Universal Rejection: A signal is generated when a candle tests a band (or the VWAP mid-line) and closes in the opposite direction (e.g., price touches the upper band and closes as a red candle).
Cumulative Volume Delta (CVD) Confirmation: Using request.security_lower_tf, the script analyzes volume delta from a lower timeframe (e.g., 1-minute). A signal only confirms if the aggressive market orders (buying for longs, selling for shorts) align with the rejection direction.
Volatility Filtering: An optional ATR-based filter ensures that the rejection candle has sufficient range to represent a meaningful shift in momentum.
Unique Signal Filtering
To maintain a clean interface and avoid "signal clusters" during trending periods, the script uses a State-Based Filter:
Neutral Zone Reset: After a signal triggers at the outer bands, the script will not generate another signal in that direction until price returns to the "Neutral Zone" (the area between the SD 1.0 bands).
Scaling Logic: The indicator permits "scaling in" signals if the price moves to a deeper standard deviation level (e.g., from SD 2 to SD 3) before returning to the mean.
Usage & Best Practices
Timeframes: Optimized for intraday scalping (1m, 5m, 15m).
Execution: Ideal targets are the VWAP mid-line (mean) or the opposite SD 1 band.
CVD Setup: For the most accurate delta readings, ensure the "CVD Calculation Timeframe" in settings is set to 1-minute or lower.
How It Works (Technical Logic)
This script identifies reversal setups based on the convergence of three primary data points:
Statistical Extremes (VWAP SD Bands): The indicator calculates three standard deviation bands based on the VWAP. These bands serve as dynamic "overbought" and "oversold" zones.
Universal Rejection: A signal is generated when a candle tests a band (or the VWAP mid-line) and closes in the opposite direction (e.g., price touches the upper band and closes as a red candle).
Cumulative Volume Delta (CVD) Confirmation: Using request.security_lower_tf, the script analyzes volume delta from a lower timeframe (e.g., 1-minute). A signal only confirms if the aggressive market orders (buying for longs, selling for shorts) align with the rejection direction.
Volatility Filtering: An optional ATR-based filter ensures that the rejection candle has sufficient range to represent a meaningful shift in momentum.
Unique Signal Filtering
To maintain a clean interface and avoid "signal clusters" during trending periods, the script uses a State-Based Filter:
Neutral Zone Reset: After a signal triggers at the outer bands, the script will not generate another signal in that direction until price returns to the "Neutral Zone" (the area between the SD 1.0 bands).
Scaling Logic: The indicator permits "scaling in" signals if the price moves to a deeper standard deviation level (e.g., from SD 2 to SD 3) before returning to the mean.
Usage & Best Practices
Timeframes: Optimized for intraday scalping (1m, 5m, 15m).
Execution: Ideal targets are the VWAP mid-line (mean) or the opposite SD 1 band.
CVD Setup: For the most accurate delta readings, ensure the "CVD Calculation Timeframe" in settings is set to 1-minute or lower.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。