Anchored VWAP Suite | Flux ChartsGENERAL OVERVIEW
The Anchored VWAP Suite is an all-in-one anchored VWAP toolkit designed to plot every meaningful VWAP a trader needs from a single indicator. Instead of dropping a stand-alone anchored VWAP each time the chart prints a new swing high, swing low, daily extreme, or session boundary, the indicator does that work automatically and keeps every line on the chart managed, color-coded, and labeled.
The main goal of this indicator is to give traders a clean, automatic read on where the volume-weighted average sits from every important reference point in the market — without having to manually anchor anything. Every line you see on the chart represents the average price the market has traded at since a moment that mattered: a swing high, a session open, today’s low, and so on.
It plots six different families of anchored VWAPs simultaneously: Swing High/Low, Lookback High/Low, Daily Open/High/Low, Weekly Open/High/Low, Monthly Open/High/Low, and Session High/Low (Asia, London, NY). Every family is independently configurable — you can enable only the ones you use, set the price source for each, and control the color, line style, and how many of each type stay on the chart.
The indicator also smartly merges overlapping VWAP labels at the right edge of the chart. When two or more VWAPs converge to the same level, you see one combined label like "Daily High & Swing Low" instead of multiple stacked labels fighting for space.
This indicator was developed for traders who already use anchored VWAPs as part of their workflow and want every important anchor — swing, session, daily, weekly, monthly — drawn for them automatically and kept clean even when many are active at once.
WHAT IS THE THEORY BEHIND THIS INDICATOR?
An anchored VWAP plots the average price weighted by volume, starting from a specific bar — the "anchor." Once anchored, the line continues forward and updates each bar, showing the volume-weighted average price of everyone who has traded since that anchor was set.
Why traders use it: the anchor point is usually a moment of decision in the market — a swing high where supply showed up, a daily open where the session began, or the start of a major session. Everyone who entered around that anchor is now positioned relative to the VWAP. When price reclaims or rejects the line, it tells you whether those traders are in profit or in loss as a group, and the line itself often acts as dynamic support or resistance.
The challenge with anchored VWAPs is that there are many useful anchor points. A serious trader might want VWAPs from the last swing high, the last swing low, today’s open, today’s high, today’s low, the previous week’s high, the start of the NY session, and so on. Manually anchoring all of those — and re-anchoring them every time a new extreme prints — is tedious and error-prone.
The Anchored VWAP Suite handles this automatically. It detects every meaningful anchor point on the chart, draws the VWAP from that anchor, keeps it updated as new extremes print, retires old VWAPs as they age out, and presents the whole set in a way that stays readable even when ten or more lines are on the chart at once.
ANCHORED VWAP SUITE FEATURES
The Anchored VWAP Suite includes 7 main features:
Session Anchors
Swing Anchors
Lookback Anchors
Daily Anchors
Weekly Anchors
Monthly Anchors
Customization Options
🔹 Method
Method controls how each new bar affects a VWAP after its anchor is set. Three modes are available:
◇ Standard: every bar from the anchor counts equally. This is the classic anchored VWAP — older bars carry the same weight as the most recent ones. The line becomes steadily slower to respond as the anchor moves further into the past.
◇ EMA: recent bars are weighted more heavily, using a 2/(N+1) coefficient. The VWAP responds faster to new price action while still tracking back to the anchor point.
◇ RMA: also weights recent bars more, but with a slower 1/N coefficient (Wilder's smoothing). Smoother than EMA, but lags more.
The default is RMA, which produces a responsive line that behaves consistently whether the anchor is recent or far back.
🔹 Period
Period sets the length used by the EMA and RMA modes. Larger values smooth more — the line moves less. Smaller values make the line more reactive but jumpier. Period is ignored when Method is set to Standard, since Standard treats every bar equally regardless of length.
The default is 20.
🔹 Max VWAP Length
Max VWAP Length caps how far back a single VWAP can anchor before it's dropped from the chart. The default of 5,000 bars covers most use cases. Raise it if you need to keep very old anchored VWAPs visible — for example, swing VWAPs from far back in history. Lower it if you find the indicator slowing down on heavy charts; a smaller cap means less work to render and a snappier response when many VWAPs are active at once.
This cap also applies when a new VWAP is first drawn: anchors older than the configured limit are not created, so every line on the chart always fits inside the configured length.
COMMON ANCHOR SETTINGS: SOURCE & COUNT
Beyond the General Configuration above, two settings — Source and Count — appear in nearly every anchor family. Because they work the same way across all of them, they are explained here once and then referenced inside each anchor family below.
🔹 Source
Source controls which price each bar contributes to the VWAP after the anchor is set, but it does not change the anchor itself. The anchor bar is always pinned to its defining extreme: a Swing High VWAP anchors at the actual high of the swing-high candle, a Daily Open VWAP anchors at the actual open of the day, a Daily Low VWAP anchors at the actual low, and so on. From the bar after that, the Source you choose decides which price gets fed into the volume-weighted calculation.
Available sources:
◇ High — only the high of each bar contributes
◇ Low — only the low of each bar contributes
◇ Close — only the close of each bar contributes
◇ Open — only the open of each bar contributes
◇ HLC3 — average of high, low, and close (the classic "typical price")
◇ HL2 — midpoint of high and low
◇ OHLC4 — average of open, high, low, and close
In practice, most traders leave Source at the default for each anchor type: High for "high" anchors, Low for "low" anchors, Open for open-based anchors. Switching to HLC3, HL2, or OHLC4 produces a smoother VWAP that's less sensitive to long wicks, while sticking with High, Low, or Close keeps the line tight to a single price point on every bar.
🔹 Count
Count controls how many VWAPs of a given type are kept on the chart at once. As new anchors form, older ones drop off automatically — so a Count of 3 on Daily Open VWAPs means the indicator always shows the three most recent daily-open VWAPs and quietly drops anything older.
Set Count to 1 for a clean chart that only shows the latest anchor of each type. Raise it when you want a side-by-side view of how price has interacted with multiple historical anchors of the same kind.
SESSION ANCHORS
🔹 What Are Session Anchors?
Session anchors are VWAPs anchored to the session high and session low of the three major intraday sessions: Asia, London, and New York. They appear as each session develops and lock in once the session closes.
🔹 Default Session Times (New York Time)
◇ Asia: 20:00 – 22:00
◇ London: 02:00 – 04:00
◇ New York: 10:00 – 12:00
🔹 Live Re-Anchoring
While a session is open, the high and low VWAPs re-anchor automatically each time price prints a new extreme inside that session. The moment the session ends, the final anchors are confirmed and stay on the chart, giving traders a clean record of where the session’s volume-weighted averages sit relative to current price.
🔹 Session Boxes and Labels
Each session is also drawn as a colored box that expands as price moves. The box contains the full high-to-low range of the session and is labeled with the session name (Asia, London, NY) along its top edge. Boxes from previous sessions are kept on the chart so you can quickly see the prior session’s range alongside the live one.
🔹 Customization Options
Show / Hide toggle for each session (Asia, London, NY)
High and Low source for each session
High color and Low color for each session
Show / Hide Session Boxes toggle and box color
Show / Hide Session Labels toggle
Line style (Solid, Dotted, Dashed) and width for session VWAPs
SWING ANCHORS
🔹 What Are Swing Anchors?
Swing anchors are VWAPs drawn from the last confirmed swing high or swing low on the chart. A swing high is a candle whose high stands above the highs of the bars surrounding it; a swing low is the opposite. Both make natural anchor points because they often mark the moment supply or demand showed up in size.
🔹 How the Indicator Detects Swings
The indicator looks for pivots using two confirmation windows: a "Swing Bars Left" count and a "Swing Bars Right" count. The current pivot must be the most extreme bar over both windows before the swing is locked in, and a VWAP is anchored to it. Larger values catch only the more meaningful swings; smaller values catch more frequent (but noisier) ones. The default is 10 bars left and 10 bars right.
🔹 Count
Up to 10 swing-high VWAPs and 10 swing-low VWAPs can be kept on the chart at once. As new swings form, older ones drop off automatically.
🔹 Extend All Toggle
When Extend All is on, every kept swing VWAP keeps drawing forward to the current bar — useful for studying how price interacts with multiple historical anchors at once. When off, each swing VWAP stops where the next one of the same direction begins, keeping the chart cleaner.
🔹 Customization Options
Show / Hide toggle for Swing High VWAPs and Swing Low VWAPs
Count for each (1–10)
Price source for each (High, Low, Close, Open, HLC3, HL2, OHLC4)
Swing Bars Left and Right (1–50)
Line style (Solid, Dotted, Dashed) and width (1–5)
Color for swing high and swing low
Extend All toggle
LOOKBACK ANCHORS
🔹 What Are Lookback Anchors?
A lookback anchor is a VWAP that re-anchors automatically every time the price prints a new extreme over a rolling window. The Highest High VWAP re-anchors whenever the current bar’s high tops the highest high of the previous N bars. The Lowest Low VWAP works the same way for new lows.
🔹 How It Helps
Where a swing anchor needs confirmation bars before it locks in, a lookback anchor responds the moment a new extreme is made. This makes lookback VWAPs useful for tracking the most aggressive recent move — they always reflect the volume-weighted average from the most recent breakout high or breakdown low.
🔹 Customization Options
Show / Hide toggles for Highest High and Lowest Low
Price source for each
Color for each
Lookback Length (2–500, default 50)
Line style and width
DAILY ANCHORS
🔹 What Are Daily Anchors?
Daily anchors are VWAPs anchored to the current trading day’s Open, High, and Low bars. They appear as the day develops and re-anchor live whenever a new daily extreme prints. At the end of the day, the active anchors are confirmed, and a fresh set begins the next day.
🔹 The Three Daily VWAPs
◇ Daily Open VWAP: anchored to the bar that opened today’s session. Tracks the volume-weighted average from the start of the day.
◇ Daily High VWAP: anchored to today’s high bar. Re-anchors when a new daily high prints.
◇ Daily Low VWAP: anchored to today’s low bar. Re-anchors when a new daily low prints.
🔹 Why It Matters
The daily open is one of the most-watched intraday levels. A VWAP from it tells you immediately whether the average trader who entered today is in profit or loss. The daily high and low VWAPs do the same for the people who entered at the day’s extremes — useful for spotting reaction zones around prior swing points.
🔹 Customization Options
Show / Hide toggles for Daily Open, Daily High, Daily Low
Count for each (1–50, lets you keep historical daily VWAPs on the chart)
Price source for each
Color for each
Line style and width
Extend All toggle
WEEKLY ANCHORS
🔹 What Are Weekly Anchors?
Weekly anchors work the same way as daily anchors, but for the current trading week’s Open, High, and Low. They appear as the week develops and re-anchor when new weekly extremes print. At the start of each new week, the previous week’s anchors are confirmed and the next week begins.
🔹 The Three Weekly VWAPs
◇ Weekly Open VWAP: anchored to the bar that opened this week.
◇ Weekly High VWAP: anchored to the week’s high bar so far.
◇ Weekly Low VWAP: anchored to the week’s low bar so far.
🔹 Why It Matters
Weekly VWAPs are useful for swing traders and for anyone watching how price holds up against bigger structural references. A break and hold above the Weekly Open VWAP often confirms the bullish case for the week; a break below confirms the bearish one.
🔹 Customization Options
Show / Hide toggles for Weekly Open, Weekly High, Weekly Low
Count for each (1–50)
Price source for each
Color for each
Line style and width
Extend All toggle
MONTHLY ANCHORS
🔹 What Are Monthly Anchors?
Monthly anchors plot VWAPs from the current month’s Open, High, and Low. Like the daily and weekly versions, they re-anchor as new monthly extremes print and confirm at the end of the month.
🔹 The Three Monthly VWAPs
◇ Monthly Open VWAP: anchored to the first bar of the current calendar month.
◇ Monthly High VWAP: anchored to the month’s high bar so far.
◇ Monthly Low VWAP: anchored to the month’s low bar so far.
🔹 Why It Matters
Monthly anchors give a longer-term read that’s especially helpful on higher-timeframe trades. They often line up with major structural levels and can highlight institutional positioning over multi-week windows.
🔹 Customization Options
Show / Hide toggles for Monthly Open, Monthly High, Monthly Low
Count for each (1–50)
Price source for each
Color for each
Line style and width
Extend All toggle
SMART RIGHT-EDGE LABELS
🔹 What the Labels Show
Every VWAP on the chart can display a small text tag at its right edge, naming what that VWAP is anchored to — for example "Swing High," "Daily Open," or "London Low." This makes it instantly clear what each line on the chart represents without needing to memorize colors.
🔹 Auto-Merging at Confluence Zones
When two or more VWAPs converge to the same price at the same bar, the indicator automatically merges their labels into one combined tag using an "&" separator. For example, if the Daily Open VWAP and a Swing Low VWAP land on the same price, the right edge shows a single label that reads "Daily Open & Swing Low" instead of two stacked labels overlapping each other.
This keeps the chart readable even when many VWAPs are active and converging at confluence zones.
🔹 Customization Options
Show / Hide VWAP Labels toggle (global)
IMPORTANT NOTES
The Anchored VWAP Suite is designed to run on intraday timeframes for the session anchors to function. Session boxes and session VWAPs are automatically hidden on Daily, Weekly, and Monthly charts. Daily, Weekly, and Monthly anchor families work on any timeframe at or below their period.
The Max VWAP Length setting controls how far back a single VWAP can anchor before it’s dropped from the chart. The default of 5,000 bars covers most use cases. If you need to keep extremely old anchored VWAPs visible, raise the value; if you find the indicator is slow on large symbols, lower it.
Live anchors (the developing daily, weekly, monthly, and session anchors) update intra-bar so the line keeps pace with price. Historical bars never repaint after they close.
When Extend All is off (default for Swing, Daily, Weekly, and Monthly families), each VWAP of a given type stops where the next one of the same type begins. This keeps the chart from looking cluttered when many historical anchors are kept.
UNIQUENESS
The Anchored VWAP Suite is unique because it consolidates every anchor family a serious anchored VWAP user would draw — swing, lookback, daily, weekly, monthly, and session — into a single managed indicator. Each family has its own price source, color, line style, count, and extend mode, which means the same script can render dozens of independently configured VWAPs at once without users needing to load multiple separate scripts. Live anchors automatically re-anchor as new extremes print during the in-progress period and lock in the moment the period closes, so the chart always reflects the most current set of meaningful anchors. Three smoothing modes — Standard, EMA, and RMA — give traders a choice between the classic cumulative anchored VWAP and faster, more responsive variants that stay usable even when the anchor is very far back. The smart right-edge label system automatically merges overlapping labels at confluence zones, which keeps the chart readable even when many VWAPs are active and crossing at the same price. By unifying all of these capabilities into one indicator with consistent styling, shared smoothing logic, and automatic anchor management, the Anchored VWAP Suite removes the need to drop and manually maintain many separate anchored VWAPs and produces a clean, deterministic read on every important VWAP across the chart.
Indicador Pine Script®






















