OPEN-SOURCE SCRIPT
Anchored VWAP Sigma Bands

Anchored VWAP Sigma Bands
1. Overview

Anchored VWAP Sigma Bands is a chart-based analysis indicator that plots an Anchored Volume-Weighted Average Price together with volume-weighted standard deviation bands.
The purpose of the tool is to help traders study fair value, price extension, and distance from an anchored VWAP reference point.
This is an indicator, not a strategy. It does not place trades, does not execute orders, and does not produce TradingView Strategy Tester results. All levels are visual analytical references only and should not be treated as guaranteed support, resistance, reversal, or continuation signals.
2. Core Idea
Standard VWAP usually resets by session or period.
Anchored VWAP is different because it starts from a selected anchor point.
That anchor can represent an important market event, such as a major high, major low, selected date, start of a year, start of a month, start of a week, or a new highest/lowest level over a lookback window.
From that anchor point, the indicator calculates the volume-weighted average price.
This creates a reference for the average price traded since the selected anchor.
3. Anchored VWAP Line

The main blue line is the Anchored VWAP.
It represents the volume-weighted average price from the active anchor point.
A price above the anchored VWAP may suggest that price is trading above the volume-weighted fair value from that anchor.
A price below the anchored VWAP may suggest that price is trading below the volume-weighted fair value from that anchor.
This should be interpreted as context only. It does not guarantee future price direction.
4. Sigma Bands
The indicator calculates volume-weighted standard deviation from the anchored VWAP.
The sigma bands show how far price has moved from the anchored VWAP in statistical terms.

The script can plot:
* +1 Sigma
* -1 Sigma
* +2 Sigma
* -2 Sigma
* +3 Sigma
* -3 Sigma
The +sigma bands are above the anchored VWAP.
The -sigma bands are below the anchored VWAP.
These bands can help identify areas where price is statistically extended relative to the anchored VWAP.
5. Band 1
Band 1 is the first standard deviation band.
By default, it uses 1.0 sigma.
This band can help users observe the normal upper and lower range around the anchored VWAP.
6. Band 2
Band 2 is the second standard deviation band.
By default, it uses 2.0 sigma.
This area can represent a stronger statistical extension from the anchored VWAP.
A move into the +2 or -2 sigma area does not guarantee reversal. It only shows that price is extended relative to the anchored VWAP calculation.
7. Band 3
Band 3 is optional and is OFF by default.
By default, it uses 3.0 sigma.
This band is intended for users who want to monitor deeper statistical extensions.
Because 3 sigma areas can be far away from price on some markets, this band is optional to keep the chart clean.
8. Anchor Modes
The indicator includes several anchor modes.
Manual date
The user selects a specific date and time as the anchor.
This is useful when anchoring VWAP to an important event, such as a major low, major high, breakout, earnings date, market cycle start, or a selected analysis date.
Year
The anchored VWAP resets at the start of each new year.
Month
The anchored VWAP resets at the start of each new month.
Week
The anchored VWAP resets at the start of each new week.
Highest high (N)
The anchor resets when price forms a new highest high over the selected lookback window.
This mode can be used to study dynamic resistance-based anchors.
Lowest low (N)
The anchor resets when price forms a new lowest low over the selected lookback window.
This mode can be used to study dynamic support-based anchors.
9. Dynamic Anchor Behavior
Dynamic anchor modes such as Highest high (N) and Lowest low (N) re-anchor when a new selected high or low forms.
This is expected behavior.
These modes are designed to update the anchored VWAP reference when the market creates a new extreme over the selected lookback.
Manual date mode is more static because the user chooses a fixed anchor date.
10. Anchor Marker
The indicator can display an anchor marker on the chart.
The anchor marker shows where the current anchored VWAP calculation begins.
To keep the chart clean, the script keeps only the most recent anchor marker visible.
Users can enable or disable the anchor marker from the settings.
11. Optional Anchor Line
The script includes an optional vertical anchor line.
When enabled, it marks the latest anchor point on the chart.
This option is OFF by default to keep the chart visually clean.
12. Volume-Weighted Calculation
The indicator uses volume in its VWAP and standard deviation calculations.
This means that higher-volume bars have more influence on the anchored VWAP and sigma bands.
If a symbol has no real volume data, the script uses a fallback value so the calculation can still display, but the result should not be interpreted the same way as a true volume-weighted calculation.
For best results, use symbols with reliable volume data.
13. Fill Zones
The indicator can fill the area between the bands.
The center fill helps show the main value area around anchored VWAP.
The upper fill highlights the area above the VWAP between sigma bands.
The lower fill highlights the area below the VWAP between sigma bands.
Users can turn the fill on or off in settings.
14. Alerts
The script includes alert conditions for:
* Price crossing above anchored VWAP
* Price crossing below anchored VWAP
* Price reaching the selected upper sigma band
* Price reaching the selected lower sigma band
Alerts are notifications only. They do not place orders and do not confirm broker execution.
15. How to Use
A practical workflow:
1. Select an anchor mode.
2. Use Manual date if you want to anchor VWAP to a specific event.
3. Use Year, Month, or Week if you want periodic VWAP references.
4. Use Highest high (N) or Lowest low (N) if you want dynamic anchor behavior.
5. Watch the anchored VWAP as the main fair-value reference.
6. Use sigma bands to observe statistical extension from the anchored VWAP.
7. Review +2 and -2 sigma areas as extension zones, not guaranteed reversal zones.
8. Combine the indicator with market structure, volume, support/resistance, trend context, and risk management.
9. Suggested Use Cases
Anchored VWAP Sigma Bands can be useful for:
* Anchored fair value analysis
* Event-based VWAP analysis
* Market cycle reference
* Volume-weighted mean analysis
* Statistical price extension
* Trend pullback context
* Support and resistance context
* Higher-timeframe analysis
* Manual anchor analysis from major highs or lows
17. Important Limitations
This indicator does not predict future price movement.
It does not guarantee reversals.
It does not guarantee continuations.
It does not guarantee profitable trades.
It is not a trading strategy.
It does not place orders.
It does not produce Strategy Tester results.
Anchored VWAP can act as a reference level, but price may move above or below it for extended periods.
Sigma bands show statistical distance, not guaranteed turning points.
Dynamic anchor modes can re-anchor when new highs or lows occur. This is expected behavior.
The quality of the calculation depends on the quality of volume data.
On symbols without reliable volume, the VWAP calculation may be less meaningful.
Users are responsible for their own trading decisions, risk management, and position sizing.
18. Originality and Purpose
Anchored VWAP Sigma Bands combines anchored VWAP analysis with volume-weighted standard deviation bands in a clean chart format.
The script includes:
* Multiple anchor modes
* Manual date anchor
* Periodic anchors
* Dynamic high/low anchors
* Volume-weighted VWAP calculation
* Volume-weighted sigma bands
* Optional anchor marker
* Optional anchor line
* Optional filled zones
* Alerts for VWAP crosses and sigma extension events
The purpose of the indicator is to provide a clear anchored fair-value map and statistical extension zones for chart analysis.
19. Educational Disclaimer
This script is for educational and chart-analysis purposes only. It is not financial advice, investment advice, or a recommendation to buy or sell any financial instrument. Users should perform their own analysis and manage risk independently.
1. Overview
Anchored VWAP Sigma Bands is a chart-based analysis indicator that plots an Anchored Volume-Weighted Average Price together with volume-weighted standard deviation bands.
The purpose of the tool is to help traders study fair value, price extension, and distance from an anchored VWAP reference point.
This is an indicator, not a strategy. It does not place trades, does not execute orders, and does not produce TradingView Strategy Tester results. All levels are visual analytical references only and should not be treated as guaranteed support, resistance, reversal, or continuation signals.
2. Core Idea
Standard VWAP usually resets by session or period.
Anchored VWAP is different because it starts from a selected anchor point.
That anchor can represent an important market event, such as a major high, major low, selected date, start of a year, start of a month, start of a week, or a new highest/lowest level over a lookback window.
From that anchor point, the indicator calculates the volume-weighted average price.
This creates a reference for the average price traded since the selected anchor.
3. Anchored VWAP Line
The main blue line is the Anchored VWAP.
It represents the volume-weighted average price from the active anchor point.
A price above the anchored VWAP may suggest that price is trading above the volume-weighted fair value from that anchor.
A price below the anchored VWAP may suggest that price is trading below the volume-weighted fair value from that anchor.
This should be interpreted as context only. It does not guarantee future price direction.
4. Sigma Bands
The indicator calculates volume-weighted standard deviation from the anchored VWAP.
The sigma bands show how far price has moved from the anchored VWAP in statistical terms.
The script can plot:
* +1 Sigma
* -1 Sigma
* +2 Sigma
* -2 Sigma
* +3 Sigma
* -3 Sigma
The +sigma bands are above the anchored VWAP.
The -sigma bands are below the anchored VWAP.
These bands can help identify areas where price is statistically extended relative to the anchored VWAP.
5. Band 1
Band 1 is the first standard deviation band.
By default, it uses 1.0 sigma.
This band can help users observe the normal upper and lower range around the anchored VWAP.
6. Band 2
Band 2 is the second standard deviation band.
By default, it uses 2.0 sigma.
This area can represent a stronger statistical extension from the anchored VWAP.
A move into the +2 or -2 sigma area does not guarantee reversal. It only shows that price is extended relative to the anchored VWAP calculation.
7. Band 3
Band 3 is optional and is OFF by default.
By default, it uses 3.0 sigma.
This band is intended for users who want to monitor deeper statistical extensions.
Because 3 sigma areas can be far away from price on some markets, this band is optional to keep the chart clean.
8. Anchor Modes
The indicator includes several anchor modes.
Manual date
The user selects a specific date and time as the anchor.
This is useful when anchoring VWAP to an important event, such as a major low, major high, breakout, earnings date, market cycle start, or a selected analysis date.
Year
The anchored VWAP resets at the start of each new year.
Month
The anchored VWAP resets at the start of each new month.
Week
The anchored VWAP resets at the start of each new week.
Highest high (N)
The anchor resets when price forms a new highest high over the selected lookback window.
This mode can be used to study dynamic resistance-based anchors.
Lowest low (N)
The anchor resets when price forms a new lowest low over the selected lookback window.
This mode can be used to study dynamic support-based anchors.
9. Dynamic Anchor Behavior
Dynamic anchor modes such as Highest high (N) and Lowest low (N) re-anchor when a new selected high or low forms.
This is expected behavior.
These modes are designed to update the anchored VWAP reference when the market creates a new extreme over the selected lookback.
Manual date mode is more static because the user chooses a fixed anchor date.
10. Anchor Marker
The indicator can display an anchor marker on the chart.
The anchor marker shows where the current anchored VWAP calculation begins.
To keep the chart clean, the script keeps only the most recent anchor marker visible.
Users can enable or disable the anchor marker from the settings.
11. Optional Anchor Line
The script includes an optional vertical anchor line.
When enabled, it marks the latest anchor point on the chart.
This option is OFF by default to keep the chart visually clean.
12. Volume-Weighted Calculation
The indicator uses volume in its VWAP and standard deviation calculations.
This means that higher-volume bars have more influence on the anchored VWAP and sigma bands.
If a symbol has no real volume data, the script uses a fallback value so the calculation can still display, but the result should not be interpreted the same way as a true volume-weighted calculation.
For best results, use symbols with reliable volume data.
13. Fill Zones
The indicator can fill the area between the bands.
The center fill helps show the main value area around anchored VWAP.
The upper fill highlights the area above the VWAP between sigma bands.
The lower fill highlights the area below the VWAP between sigma bands.
Users can turn the fill on or off in settings.
14. Alerts
The script includes alert conditions for:
* Price crossing above anchored VWAP
* Price crossing below anchored VWAP
* Price reaching the selected upper sigma band
* Price reaching the selected lower sigma band
Alerts are notifications only. They do not place orders and do not confirm broker execution.
15. How to Use
A practical workflow:
1. Select an anchor mode.
2. Use Manual date if you want to anchor VWAP to a specific event.
3. Use Year, Month, or Week if you want periodic VWAP references.
4. Use Highest high (N) or Lowest low (N) if you want dynamic anchor behavior.
5. Watch the anchored VWAP as the main fair-value reference.
6. Use sigma bands to observe statistical extension from the anchored VWAP.
7. Review +2 and -2 sigma areas as extension zones, not guaranteed reversal zones.
8. Combine the indicator with market structure, volume, support/resistance, trend context, and risk management.
9. Suggested Use Cases
Anchored VWAP Sigma Bands can be useful for:
* Anchored fair value analysis
* Event-based VWAP analysis
* Market cycle reference
* Volume-weighted mean analysis
* Statistical price extension
* Trend pullback context
* Support and resistance context
* Higher-timeframe analysis
* Manual anchor analysis from major highs or lows
17. Important Limitations
This indicator does not predict future price movement.
It does not guarantee reversals.
It does not guarantee continuations.
It does not guarantee profitable trades.
It is not a trading strategy.
It does not place orders.
It does not produce Strategy Tester results.
Anchored VWAP can act as a reference level, but price may move above or below it for extended periods.
Sigma bands show statistical distance, not guaranteed turning points.
Dynamic anchor modes can re-anchor when new highs or lows occur. This is expected behavior.
The quality of the calculation depends on the quality of volume data.
On symbols without reliable volume, the VWAP calculation may be less meaningful.
Users are responsible for their own trading decisions, risk management, and position sizing.
18. Originality and Purpose
Anchored VWAP Sigma Bands combines anchored VWAP analysis with volume-weighted standard deviation bands in a clean chart format.
The script includes:
* Multiple anchor modes
* Manual date anchor
* Periodic anchors
* Dynamic high/low anchors
* Volume-weighted VWAP calculation
* Volume-weighted sigma bands
* Optional anchor marker
* Optional anchor line
* Optional filled zones
* Alerts for VWAP crosses and sigma extension events
The purpose of the indicator is to provide a clear anchored fair-value map and statistical extension zones for chart analysis.
19. Educational Disclaimer
This script is for educational and chart-analysis purposes only. It is not financial advice, investment advice, or a recommendation to buy or sell any financial instrument. Users should perform their own analysis and manage risk independently.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.