VWAP calculates the average price at which an asset has traded over a rolling window of N bars, weighted by volume — not the traditional session-reset VWAP. It continuously updates bar-by-bar, the same way an SMA does.
VWAP=∑i=1NVolumei∑i=1N(Pricei×Volumei)
How It Works
flowchart TD
subgraph Data["Market Data (last N bars)"]
P["Price (typical: H+L+C/3)"]
V["Volume"]
end
subgraph Calc["Rolling Window Calculation"]
PV["Price × Volume"]
SUM1["Σ(Price × Volume), last N bars"]
SUM2["Σ Volume, last N bars"]
end
subgraph Result["Output"]
DIV["SUM1 ÷ SUM2"]
VWAP["VWAP"]
end
P & V --> PV --> SUM1 --> DIV
V --> SUM2 --> DIV
DIV --> VWAP
Missing Data
A bar is used only when both Price and Volume are present at that slot; a bar missing either one is dropped from the window — never treated as zero. "N bars" means N observed (non-gap) bars, so the window skips past gaps (e.g. a weekend) to the next real trading days.
| Situation | Output |
|---|
| Fewer than N observed bars so far (warm-up) | No value yet |
| A missing Price or Volume slot | No value at that slot |
| A real bar with zero volume (no trades) | Counted as an observed bar — a window of all-zero-volume bars yields no value (nothing traded, not "0") |
Interpreting VWAP
| Price Position | Interpretation |
|---|
| Price > VWAP | Buyers paying above average — bullish pressure |
| Price < VWAP | Buyers paying below average — bearish pressure |
| Price ≈ VWAP | Fair value zone |
flowchart LR
subgraph Zones["Price vs VWAP"]
ABOVE["Above VWAP<br/>Bullish bias"]
AT["At VWAP<br/>Fair value"]
BELOW["Below VWAP<br/>Bearish bias"]
end
ABOVE --> AT --> BELOW
Institutional Usage
VWAP serves as a benchmark for trade execution quality:
| Trader Type | VWAP Use |
|---|
| Buyer | Aim to buy below VWAP (good fill) |
| Seller | Aim to sell above VWAP (good fill) |
| Algorithm | Execute orders near VWAP to minimize market impact |
Trading Strategies
1. VWAP as Support/Resistance
| Condition | Action |
|---|
| Price pulls back to VWAP in uptrend | Potential buy zone |
| Price rallies to VWAP in downtrend | Potential sell zone |
2. VWAP Crossover
| Event | Signal |
|---|
| Price crosses above VWAP | Intraday bullish |
| Price crosses below VWAP | Intraday bearish |
3. VWAP Bands
Standard deviation bands around VWAP help identify:
- Overbought: Price at +2σ band
- Oversold: Price at -2σ band
VWAP vs Moving Averages
| Aspect | VWAP (this module) | SMA/EMA |
|---|
| Volume | ✓ Incorporated | ✗ Price only |
| Window | Rolling, last N bars | Rolling, last N bars |
| Institutional use | Primary benchmark | Secondary indicator |
| Best for | Execution assessment | Trend identification |
Considerations
| Factor | Impact |
|---|
| Window size | Larger N smooths more but reacts slower to recent volume shifts |
| Volume spikes | High-volume bars heavily influence VWAP |
| Rolling, not session-anchored | Unlike a broker's intraday VWAP, this indicator never resets — pick N to match the lookback you care about |
Advantages
- Volume-weighted — Reflects true average traded price
- Institutional benchmark — Standard for execution quality
- Dynamic support/resistance — Continuously updates with new bars
- Clear signal — Above/below provides directional bias
Disadvantages
- Not session-anchored — Does not replicate a broker's daily-reset VWAP; use window sizing to approximate a session
- Volume dependent — Requires reliable volume data
- Warm-up gap — No value until N bars have been observed
Further Reading
Indicator Assessment
%%{init: {'theme': 'base', 'themeVariables': { 'cScale0': '#2563eb', 'cScale1': '#7c3aed'}}}%%
quadrantChart
title VWAP Indicator Assessment
x-axis Low Complexity --> High Complexity
y-axis Low Reliability --> High Reliability
quadrant-1 High Value
quadrant-2 Specialized
quadrant-3 Limited Use
quadrant-4 Accessible
Stocks: [0.30, 0.80]
Crypto: [0.30, 0.60]
| Dimension | Stocks | Crypto | Notes |
|---|
| Popularity | 9/10 | 7/10 | The institutional standard for execution quality in equities; increasingly adopted in crypto |
| Reliability | 8/10 | 6/10 | Highly reliable for liquid stocks with accurate volume data; crypto volume reporting varies |
| Complexity | 3/10 | 3/10 | Simple rolling-window formula; straightforward interpretation |
| Versatility | 7/10 | 6/10 | Excellent for intraday trading; window size tunes the effective lookback |
| Recent Interest | 8/10 | 8/10 | Core institutional tool; growing use in algorithmic and crypto trading strategies |