OPEN-SOURCE SCRIPT

VWAP Trend with Standard Deviation & Midlines

This indicator is a sophisticated VWAP (Volume Weighted Average Price) tool with multiple features:

Core Functionality:
1. Calculates a primary VWAP line that changes color based on trend direction (green when rising, red when falling)
2. Creates multiple standard deviation bands around the VWAP at customizable distances
3. Resets calculations at either:
- New York session start time (configurable, default 9:30 AM)
- Daily start time
- Can be hidden on daily/weekly/monthly timeframes if desired

Band Structure:
- Band 1 (innermost): ±1 standard deviation
- Band 2 (middle): ±2 standard deviations
- Band 3 (outermost): ±3 standard deviations
- Midlines at 0.5σ intervals between bands
- All bands can be individually enabled/disabled

Customization Options:
1. Band calculation modes:
- Standard Deviation based
- Percentage based
2. Visual settings:
- Customizable colors for all elements
- Adjustable line widths
- Optional labels with configurable size
- Optional extension lines
- Label position adjustment
3. Source data selection (default: HLC3 - High, Low, Close average)

Common Uses:
- Identifying potential support/resistance levels
- Measuring price volatility
- Spotting mean reversion opportunities
- Trading range analysis
- Trend direction confirmation

The indicator essentially creates a dynamic support/resistance structure that adapts to market volatility and volume, making it useful for both intraday and swing trading strategies.
Standard DeviationTrend AnalysisVolume Weighted Average Price (VWAP)

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer