Tool
VWAP
market.vwap
Inputs
No typed inputs.
Outputs
A bundle: the VWAP line (volume-weighted fair value) plus inner and outer bands at band_mult_1 and band_mult_2 standard deviations above and below it.
VWAP (Volume-Weighted Average Price) is the average price of a market over a chosen span, weighted by how much volume traded at each price. Traders use it as a fair-value line: price above VWAP leans bullish for the span, below it leans bearish.
How it works
Bar by bar it adds up (price x volume) and divides by total volume since the anchor point, so heavily traded bars pull the line harder. The anchor decides when that running total RESETS (each session, day, week, or never), and two standard-deviation bands are drawn at band_mult_1 and band_mult_2 multiples around the line to mark how stretched price is from the average.
Modes
Anchor options
Reset the VWAP accumulation at the start of each trading session, so the line measures fair value only within that session.
When to use: Use for intraday trading where each session's flow should be judged on its own.
Reset the VWAP at the start of each calendar day, giving one fair-value line per day.
When to use: Use for day-trading where the daily open is the reference point.
Reset the VWAP at the start of each week, so the line tracks fair value across the whole week.
When to use: Use for swing trading that holds positions across several days.
Never reset: the VWAP keeps accumulating across the whole window, producing one slow-moving line.
When to use: Use when you want a single long-run fair value rather than a per-period reset.
A fixed sliding window: the VWAP of the last period bars, recomputed every bar - nothing ever resets.
When to use: Use for a chart-overlay fair-value line that always reflects the most recent period bars.
Source options
Weight each bar's open price by its volume.
When to use: Use open when that price best reflects the move you trade.
Weight each bar's high price by its volume.
When to use: Use high when that price best reflects the move you trade.
Weight each bar's low price by its volume.
When to use: Use low when that price best reflects the move you trade.
Weight each bar's close price by its volume.
When to use: Use close when that price best reflects the move you trade.
Weight the median price, the average of each bar's high and low.
When to use: Use the median when you want a balanced point between the bar's extremes.
Weight the typical price, the average of high, low, and close. This is the default and the classic VWAP input.
When to use: Use the typical price for the standard VWAP behaviour.
Weight the average price, the mean of open, high, low, and close.
When to use: Use the average price for the smoothest summary of each bar.
Configuration
Where the volume-weighted average RESETS: session, day, week, or continuous (never). The reset point sets which span of price-and-volume the line summarizes.
Sliding window length in bars for the rolling anchor - the classic chart-overlay VWAP. Ignored by the session / day / week / continuous anchors.
Which price each bar contributes before volume weighting: open, high, low, close, hl2 (median), hlc3 (typical), or ohlc4 (average). hlc3 is the default and the classic VWAP input.
The standard-deviation multiple for the first (inner) band pair. The bands sit this many sigma above and below the VWAP line; 1.0 means one standard deviation.
The standard-deviation multiple for the second (outer) band pair, marking a more stretched distance from VWAP. 2.0 means two standard deviations.
Connects to
Examples
- Filter: only take longs while price holds above the session VWAP (mean-reversion bias toward fair value).
- Use interpretor.vwap_position to gate entries on price reclaiming VWAP, and fade moves that reach the +2 sigma outer band.
Common mistakes
- Reading a session VWAP across a session boundary — it resets, so the line near the open is built from very little data and is jumpy.
- Trusting VWAP on instruments with unreliable volume (e.g. forex tick volume), where the weighting is distorted.