INDICATOR MANUAL
Anchored VWAP indicator with bandsMulti-Anchor VWAP & Deviation Bands [AFD] · full manual · published to TradingView
Compare price with up to three independently anchored VWAP layers and descriptive deviation envelopes.
Start here
What the indicator does, the questions it can help answer, and its fresh-install defaults.
Each layer owns its anchor, price input, color, band multiples, and visibility. Session, Week, Month, Quarter, Year, and Manual timestamp are forward anchors known when they occur.
Prior-session extremes and confirmed swing pivots are retro anchors. Their curve appears only when the historical anchor becomes identifiable, then extends back to that anchor; it draws late rather than moving a curve that was already visible.
Bands can use anchored standard deviation, ATR, percent of VWAP, or standard error. Confluence shading compares the anchored averages themselves—not their deviation bands—and only reports when two enabled averages are within the selected tolerance. It is not a forecast or signal.
Fresh-install defaults9 documented defaults
Swipe or scroll horizontally to see every column.
| Area | Default | Result |
|---|---|---|
| Layer 1 | On · Session · Close · yellow | Draws a session-anchored VWAP with the manual 1.0× first band. |
| Layer 2 | On · Week · Close · cyan | Adds a weekly VWAP with the manual 1.0× first band. |
| Layer 3 | Off · Month · Close · purple | Keeps the third independent layer configured but hidden. |
| Bars included | Regular + extended hours | Uses every displayed chart bar and labels the ordinary bar set RTH+ETH. |
| Drawing engine | Full history · 1,000-bar draw depth | Plots ordinary paths and caps drawn retro or current-window segments. |
| Band basis | Standard deviation | Measures price dispersion around each anchored average. |
| Lines and fills | Dotted · width 1 · fills off | Draws the VWAP and band paths without shaded band interiors. |
| Confluence and labels | Confluence on · 8 points · labels on | Shades the gap between nearby anchored averages and labels line identity at a 10-bar offset. |
| Dynamic alert | VWAP or band cross | Makes confirmed realtime-bar crosses eligible for the script’s alert() call. |
How it works
How the indicator turns chart data into the states and drawings you see.
Independent anchor resolution
Every enabled layer resolves its own forward or retro anchor. A newer qualifying anchor starts that layer’s next window without changing the other layers.
Volume weighting and fallback disclosure
Usable volume weights each included bar. A bar with missing or non-positive volume receives a weight of one, and the label discloses whether the window is wholly or partly unweighted.
Four band bases
Standard deviation and standard error use the anchored window; ATR uses the selected chart-bar lookback; percent of VWAP scales from the average itself. A layer’s three multiples can be Manual, Fibonacci inner, or Fibonacci outer.
Retro backfill and draw depth
A prior-session or confirmed-swing anchor is known late. The script draws the catch-up segment from the resolved anchor to confirmation and states when the selected draw depth clipped it.
Bar-set filtering
Regular hours only excludes intraday extended-session bars from the VWAP and changes Session and Prior-session anchor boundaries. Above one day it has no effect and the label says so.
Confluence shading
The optional shade compares enabled anchored averages using ticks, points, currency, or percent of price, then fills the gap between each qualifying pair. It is unavailable in Current window only mode because that mode draws paths instead of exposing the plots required for fill geometry.
Confirmed-bar dynamic alert
On a realtime bar close, the script can compose one alert message naming the layer, anchor, and VWAP or band crossed. Historical crossings do not send that alert.
Output and state reference8 documented states
Swipe or scroll horizontally to see every column.
| Output or state | When it appears | Meaning |
|---|---|---|
| LAYER 1 / 2 / 3 VWAP | Enabled layer with resolved anchor | Volume-weighted average from that layer’s active anchor. |
| DEVIATION BAND | Enabled band with usable basis | VWAP plus or minus the selected multiple of the global band basis. |
| RETRO | Historical anchor resolves after its origin | Catch-up path appears at confirmation and extends back to the anchor. |
| CONFLUENCE SHADE | Two enabled VWAPs fall within tolerance | Descriptive proximity between anchored-average contexts. |
| PRIOR WINDOW VWAP | Optional completed prior window | Flat reference at the preceding window’s closing VWAP. |
| UNWEIGHTED | Missing or non-positive volume | One or more bars used equal weight instead of volume. |
| CLIPPED | Required drawn path exceeds draw depth | Visible segment does not reach the resolved anchor. |
| DYNAMIC ALERT | Eligible cross on confirmed realtime bar | Message names the layer, anchor, and crossed reference. |
Settings
The 84-input reference follows the seven indicator settings groups: three layer groups, Engine, Lines & fills, Line labels, and Alerts. Conditional controls remain dimmed until their parent option makes them applicable.
📈 Layer 118 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| Layer 1 enabledl1EnabledInput | Toggle | On | — |
| Anchorl1AnchorInput | Choice / text | Session | Session · Week · Month · Quarter · Year · Manual timestamp · Prior-session high · Prior-session low · Confirmed swing high · Confirmed swing low | Conditional |
| Source pricel1SourceInput | Choice / text | Close | HLC3 · Close · HL2 | Conditional |
| Manual anchor timel1ManualTimeInput | Date / time | timestamp("1 Jan 2026 00:00 +0000") | Conditional |
| Swing length (bars)l1SwingLengthInput | Whole number | 10 | Min 2 · Max 100 | Conditional |
| Colorl1ColorInput | Color | #FFEB3B | Conditional |
| Override band colorl1BandColorOnInput | Toggle | Off | Conditional |
| Band line colorl1BandColorInput | Color | #FFF59D | Conditional |
| Override text colorl1OverrideInput | Toggle | Off | Conditional |
| VWAP textl1VwapTextInput | Color | White | Conditional |
| band textl1BandTextInput | Color | Silver | Conditional |
| Band multiplesl1PresetInput | Choice / text | Manual | Manual · Fibonacci inner · Fibonacci outer | Conditional |
| Band 1l1Band1OnInput | Toggle | On | Conditional |
| x multiplel1Band1MultInput | Decimal | 1.0 | Min 0.0 · Max 10.0 · Step 0.1 | Conditional |
| Band 2l1Band2OnInput | Toggle | Off | Conditional |
| x multiplel1Band2MultInput | Decimal | 2.0 | Min 0.0 · Max 10.0 · Step 0.1 | Conditional |
| Band 3l1Band3OnInput | Toggle | Off | Conditional |
| x multiplel1Band3MultInput | Decimal | 3.0 | Min 0.0 · Max 10.0 · Step 0.1 | Conditional |
📈 Layer 218 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| Layer 2 enabledl2EnabledInput | Toggle | On | — |
| Anchorl2AnchorInput | Choice / text | Week | Session · Week · Month · Quarter · Year · Manual timestamp · Prior-session high · Prior-session low · Confirmed swing high · Confirmed swing low | Conditional |
| Source pricel2SourceInput | Choice / text | Close | HLC3 · Close · HL2 | Conditional |
| Manual anchor timel2ManualTimeInput | Date / time | timestamp("1 Jan 2026 00:00 +0000") | Conditional |
| Swing length (bars)l2SwingLengthInput | Whole number | 10 | Min 2 · Max 100 | Conditional |
| Colorl2ColorInput | Color | #00E5FF | Conditional |
| Override band colorl2BandColorOnInput | Toggle | Off | Conditional |
| Band line colorl2BandColorInput | Color | #80DEEA | Conditional |
| Override text colorl2OverrideInput | Toggle | Off | Conditional |
| VWAP textl2VwapTextInput | Color | White | Conditional |
| band textl2BandTextInput | Color | Silver | Conditional |
| Band multiplesl2PresetInput | Choice / text | Manual | Manual · Fibonacci inner · Fibonacci outer | Conditional |
| Band 1l2Band1OnInput | Toggle | On | Conditional |
| x multiplel2Band1MultInput | Decimal | 1.0 | Min 0.0 · Max 10.0 · Step 0.1 | Conditional |
| Band 2l2Band2OnInput | Toggle | Off | Conditional |
| x multiplel2Band2MultInput | Decimal | 2.0 | Min 0.0 · Max 10.0 · Step 0.1 | Conditional |
| Band 3l2Band3OnInput | Toggle | Off | Conditional |
| x multiplel2Band3MultInput | Decimal | 3.0 | Min 0.0 · Max 10.0 · Step 0.1 | Conditional |
📈 Layer 318 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| Layer 3 enabledl3EnabledInput | Toggle | Off | — |
| Anchorl3AnchorInput | Choice / text | Month | Session · Week · Month · Quarter · Year · Manual timestamp · Prior-session high · Prior-session low · Confirmed swing high · Confirmed swing low | Conditional |
| Source pricel3SourceInput | Choice / text | Close | HLC3 · Close · HL2 | Conditional |
| Manual anchor timel3ManualTimeInput | Date / time | timestamp("1 Jan 2026 00:00 +0000") | Conditional |
| Swing length (bars)l3SwingLengthInput | Whole number | 10 | Min 2 · Max 100 | Conditional |
| Colorl3ColorInput | Color | #AA00FF | Conditional |
| Override band colorl3BandColorOnInput | Toggle | Off | Conditional |
| Band line colorl3BandColorInput | Color | #EA80FC | Conditional |
| Override text colorl3OverrideInput | Toggle | Off | Conditional |
| VWAP textl3VwapTextInput | Color | White | Conditional |
| band textl3BandTextInput | Color | Silver | Conditional |
| Band multiplesl3PresetInput | Choice / text | Manual | Manual · Fibonacci inner · Fibonacci outer | Conditional |
| Band 1l3Band1OnInput | Toggle | On | Conditional |
| x multiplel3Band1MultInput | Decimal | 1.0 | Min 0.0 · Max 10.0 · Step 0.1 | Conditional |
| Band 2l3Band2OnInput | Toggle | Off | Conditional |
| x multiplel3Band2MultInput | Decimal | 2.0 | Min 0.0 · Max 10.0 · Step 0.1 | Conditional |
| Band 3l3Band3OnInput | Toggle | Off | Conditional |
| x multiplel3Band3MultInput | Decimal | 3.0 | Min 0.0 · Max 10.0 · Step 0.1 | Conditional |
⚙️ Engine5 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| Bars includedsessionFilterInput | Choice / text | Regular + extended hours | Regular + extended hours · Regular hours only |
| Current window onlycurrentWindowOnlyInput | Toggle | Off | — |
| Draw depth (bars)retroDepthInput | Whole number | 1000 | Min 50 · Max 5000 · Step 50 |
| Band basisbandBasisInput | Choice / text | Standard deviation | Standard deviation · ATR · Percent of VWAP · Standard error |
| ATR lengthatrLengthInput | Whole number | 14 | Min 1 · Max 500 | Conditional |
🎨 Lines & fills16 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| VWAP linevwapStyleInput | Choice / text | Line | Line · Line with breaks · Step line · Step line with diamonds · Circles · Cross |
| dashvwapDashInput | Choice / text | Dotted | Solid · Dashed · Dotted | Conditional |
| widthvwapWidthInput | Whole number | 1 | Min 1 · Max 10 |
| Band linesbandStyleInput | Choice / text | Line | Line · Line with breaks · Step line · Step line with diamonds · Circles · Cross |
| dashbandDashInput | Choice / text | Dotted | Solid · Dashed · Dotted | Conditional |
| widthbandWidthInput | Whole number | 1 | Min 1 · Max 10 |
| Band transparencybandTranspInput | Whole number | 55 | Min 0 · Max 100 |
| Fill inside band 1fillBand1Input | Toggle | Off | Conditional |
| band 1 to 2fill1To2Input | Toggle | Off | Conditional |
| band 2 to 3fill2To3Input | Toggle | Off | Conditional |
| Fill transparencyfillTranspInput | Whole number | 85 | Min 0 · Max 100 | Conditional |
| Prior window's closing VWAPshowPriorInput | Toggle | Off | Conditional |
| Shade layer confluenceshowConfluenceInput | Toggle | On | Conditional |
| withinconfluenceTolInput | Decimal | 8.0 | Min 0.01 · Max 1000.0 · Step 0.1 | Conditional |
| confluenceUnitInputconfluenceUnitInput | Choice / text | Points | Ticks · Points · Currency · Percent of price | Conditional |
| shadeconfluenceColorInput | Color | #FFFFFF · 82% transparent | Conditional |
🏷️ Line labels8 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| Label the linesshowLabelsInput | Toggle | On | — |
| PlacementlabelPlacementInput | Choice / text | On the line | On the line · Above the line · Below the line | Conditional |
| Offset (bars)labelOffsetInput | Whole number | 10 | Min 0 · Max 500 | Conditional |
| Show anchorlabelShowAnchorInput | Toggle | Off | Conditional |
| Show deviation bandlabelShowBandInput | Toggle | On | Conditional |
| Show pricelabelShowPriceInput | Toggle | Off | Conditional |
| Show bar setlabelShowBarSetInput | Toggle | On | Conditional |
| Show change vs prior windowlabelShowPriorInput | Toggle | Off | Conditional |
🔔 Alerts1 input
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| Alert onalertModeInput | Choice / text | VWAP or band cross | VWAP or band cross · VWAP cross · Band cross · Off |
Alerts and limitations
What can notify you, what can change the output, and what the indicator cannot establish.
Alerts
Limits to keep visible
- Retro anchors are delayed by definition. A prior-session extreme or confirmed swing cannot be identified at its origin in realtime.
- Draw depth can clip a long retro catch-up or Current window only curve; the label discloses the clip instead of silently presenting it as complete.
- Regular hours only depends on the chart and exchange session model. It does nothing above one day and may not represent the session convention a trader intends.
- Missing or non-positive volume falls back per bar to equal weight. The result is then not wholly volume-weighted and is labeled accordingly.
- ATR bands use every chart bar even when Regular hours only excludes some bars from the VWAP. The two calculations can therefore use different bar sets.
- Standard-error bands use a plain included-bar count, not a volume-weighted effective sample size. Their width is descriptive and does not establish confidence or probability.
- Current window only disables fills, prior-window VWAP, and confluence shading because those features require plotted rather than drawn paths.
- Dynamic alerts use the inputs captured when the TradingView alert is created. Recreate the alert after changing its settings.
Troubleshooting
Start with what you see on the chart. Each answer explains the likely cause and the first setting, timeframe, or data condition to check.
Why did a VWAP curve suddenly fill in older bars?
That layer uses an anchor the script can identify only after a prior-session extreme or swing is confirmed. Once confirmed, it draws the missing history back to the anchor. Use a session, calendar, or manual-time anchor if you need the line to begin without that confirmation delay.
Why does the label say unweighted?
At least one included bar had missing or non-positive volume, so the script gave that bar equal weight instead. Check whether the symbol and feed provide reliable volume. The label warns that the curve is not fully volume-weighted.
Why did the confluence shading disappear?
Current window only mode turns confluence shading off. Shading also disappears when the enabled anchored averages move farther apart than your tolerance. Check that mode first, then compare the distance with the Confluence tolerance.
Why does Regular hours only seem to do nothing?
The filter matters on intraday charts that contain separate regular- and extended-hours bars. It has no effect above one day and may look unchanged on feeds without extended hours. Test it on an intraday chart with extended hours visible.
Why can’t I find a named VWAP alert condition?
This indicator sends one dynamic alert rather than separate named conditions. In TradingView, choose Any alert() function call and set Alert on to VWAP cross, Band cross, or both before creating the alert.