VWAP definition

What is VWAP on an intraday chart?

Volume Weighted Average Price, or VWAP, weights each included price by volume. A transaction-level calculation uses execution prices; a bar-based chart commonly uses HLC3 as a price proxy, so its result need not equal the exact average of individual trades.

Direct answer

VWAP = sum(price × volume) / sum(volume), using observations since the chosen anchor. On an intraday chart, it usually accumulates from the session open and resets at the next session. A price above VWAP traded above the session volume-weighted average, but that fact alone does not predict whether price will rise.

What to set before testing

Formula

Cumulative price-volume / cumulative volume

Common source

(High + Low + Close) / 3

Common reset

Session

Main limit

It uses past price and volume

A small VWAP calculation example

The numbers are hypothetical and simplified. They show how a high-volume period has more effect on VWAP.

PeriodPrice and volumeRunning VWAP
1$100 typical price, 100 shares$100.00
2$102 typical price, 300 shares$101.50
3$101 typical price, 100 shares$101.40
InterpretationThe $102 period has three times the volume of periods 1 and 3It pulls the running average closer to $102

A test workflow you can audit

  1. 1

    Calculate typical price

    For each bar, add high, low, and close, then divide by three when HLC3 is the selected source.

  2. 2

    Multiply by bar volume

    This creates the price-volume value for the bar. Higher-volume bars contribute more to the numerator.

  3. 3

    Keep two running totals

    Add price-volume values to one cumulative total and volume to another total from the anchor.

  4. 4

    Divide and reset as defined

    Divide cumulative price-volume by cumulative volume. Start again when the chosen session or anchor period resets.

Checks to make on your chart

These checks keep the rule separate from the story told after a move has already happened.

Record whether premarket bars contribute. The same calendar date can produce different lines under regular-hours and extended-hours coverage.

Record the source and calculation timeframe. HLC3 and close define different weighted averages; changing aggregation can change HLC3 even when total volume is unchanged.

Compare new volume with accumulated volume before interpreting responsiveness. A large late-session volume burst can still move the average materially.

Build the formula before building a signal

Pineify can draft an indicator with visible cumulative values and reset rules. Validate the final source, compare the worked example, and inspect actual session boundaries before adding signal logic.

Create a Pine Script v6 indicator for SPY that calculates Session VWAP from HLC3 and volume. Plot the VWAP, cumulative price-volume, and cumulative volume in a small table. Specify exchange timezone, session boundaries, and which bars enter the sums. An extended-hours switch must use available session data; it cannot create missing history. Display unavailable when cumulative volume is zero or required inputs are missing, and explain recovery at the next reset. Verify the first loaded session and the three-row example. Do not add buy or sell claims.
Turn the rule into inspectable Pine Script

What the VWAP line means

VWAP is one price that summarizes all included bars after weighting them by volume. A bar with more volume changes the line more than a bar with less volume at a similar distance.

Traders use the line as a benchmark for session location and execution review. It is also used as an input in rule-based strategies, but a benchmark is not a complete entry system.

The reset is part of the definition

A Session VWAP normally starts again at the selected session boundary. TradingView also supports other anchor periods, including week, month, quarter, year, earnings, dividends, and splits.

  • Use a reset period that contains several chart bars.
  • Record whether extended-hours bars contribute volume.
  • Do not compare VWAP values calculated from different sessions without labeling them.

Zero weight is different from unknown weight

The example numerator is 100 × 100 + 102 × 300 + 101 × 100 = 50,700; its denominator is 500, giving 101.40. A new zero-volume observation adds zero to both sums and leaves that value unchanged. If every included volume is zero, the denominator is zero and there is no weighted mean.

Missing volume is not a known zero. Mark the result unavailable or disclose an explicit missing-data policy. Confirm whether the feed reports traded shares, contracts, base or quote volume, or tick counts before describing the result as an average transaction price.

Why VWAP lags

VWAP is an average of data that has already traded. As the session progresses, each new bar is added to a larger cumulative total, so one later bar may move the line less than one early bar.

The exact update is new VWAP = old VWAP + [new volume / (prior cumulative volume + new volume)] × (new price - old VWAP). In row 3, the weight is 100/500 = 0.2, so 101.50 + 0.2 × (101 - 101.50) = 101.40. Volume share, not time of day alone, controls this response.

Sources

Frequently asked questions

This page is an educational information tool, not investment advice or a recommendation to trade. Examples are test definitions, not live signals, historical results, or promises of returns. VWAP is based on past price and volume, and actual fills can differ from chart prices. Check current market data, costs, product rules, and your own risk limits before trading.

Put the VWAP rule in writing

Pineify turns a plain-language setup into Pine Script you can read, edit, and test. The script does not predict the next price.

Build a VWAP test rule