Volume weighted average price
All indicators

LibraryVolume

Indicator

Volume weighted average price

The average price paid since the start of the current day, week or month, each bar weighted by its volume.

VolumeOn the price3 inputsVWAP

How it is calculated

The sum of price times volume divided by the sum of volume over the bars of the period so far; the price is the source, by default hlc3 (high plus low plus close, divided by 3). Both sums start afresh at the first bar of each new period. Days start at 17:00 New York (daylight saving included) or, as Day starts chooses, at 00:00 UTC; weeks start with Monday's day, months with the 1st. While the period has traded no volume there is no value, not the last period's.

Reference: Session anchored VWAP (Berkowitz, Logue and Noser 1988)

How to read it

Price above VWAP means the period's buyers are on average in profit, below it at a loss; many traders treat it as fair value and watch pullbacks to it. Early in a period it rests on few bars and moves a lot. By default the day starts at 17:00 New York, where forex turns the day, so Sunday evening counts to Monday; 00:00 UTC is the other choice. On forex the weights are tick volume, the number of price changes, not traded size.

In a strategy

As an intraday bias: only take longs while the close is above ctx.ind("vwap", anchor="day") and shorts while it is below, or enter on a pullback to it in the direction of the day's move.

Inputs

InputTypeDefaultRange or choices
SourcesourcePrice"hlc3"close, open, high, low, hl2, hlc3, ohlc4, hlcc4
Anchor periodanchorChoice"day"Day, Week, Month
Day startssessionChoice"ny"17:00 New York, 00:00 UTC

What it draws

LineDrawn as
VWAPLine

Used in

No strategy template reads it yet.

OrionQuant