All indicators

Rolling VWAP with Standard Deviations

May 5, 2022

Static chart image
Support and ResistanceVolume BasedDashboardVolatility

The Rolling VWAP with Standard Deviations indicator provides a dynamic volume-weighted average price over a sliding time window, enhanced with multiple standard deviation bands to identify overextended price levels and volatility ranges.

Usage

The Usage section describes how the script can be used to analyze market trends and volatility. Users can utilize the central Rolling VWAP line as a dynamic support or resistance level, representing the fair value of an asset over a specific lookback period.

The standard deviation bands (ranging from 1.0 to 3.0) act as volatility-adjusted zones:

  • Mean Reversion: When price reaches the outer bands (e.g., 2.5 or 3.0), it may indicate an exhaustive state where the price is significantly stretched from the average, suggesting a potential reversal.
  • Trend Strength: Price maintaining itself between the 1.0 and 2.0 bands often signifies a strong trending environment.
  • Dynamic Support/Resistance: The various levels can be used to set profit targets or stop-loss levels based on historical volatility.

Details

This script calculates the Volume Weighted Average Price using a rolling window logic rather than an anchored start point. This ensures the indicator stays relevant to recent price action. The tool also calculates the variance and standard deviation of the price relative to this rolling average, allowing for the plotting of multiple bands.

By default, the indicator uses an "Auto" time period that scales based on your chart's timeframe (e.g., using a 1-day window for hourly charts or a 1-month window for daily charts). This ensures the lookback is always proportional to the data being viewed.

Settings

Time Period

  • Use a fixed time period: When enabled, allows you to manually define the window size in days, hours, and minutes instead of using the automatic calculation.
  • Days/Hours/Minutes: The specific duration of the rolling window when the fixed time period is active.
  • Show time period: Toggles a visual table on the chart showing the current window size.
  • Text size / Position: Controls the appearance and location of the time period information table.

Minimum Window Size

  • Bars: Sets a minimum number of bars to keep in the window. This prevents the indicator from disappearing or becoming erratic if there are large gaps in time between trading sessions.

Source

  • Source: The price input used for calculations (default is HLC3).

FAQ

How do I use the auto-timeframe feature?

By default, "Use a fixed time period" is unchecked. The indicator will automatically select an appropriate rolling window (e.g., 1 day, 1 week, 1 month) based on the timeframe of your current chart.

What do the different colors represent?

The central blue line is the Rolling VWAP. Green bands represent standard deviations below the mean (potential support/oversold), while red bands represent standard deviations above the mean (potential resistance/overbought).

How can I access this tool?

You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.