# Volume-weighted average price

`vwap`

The average price weighted by volume since the session, week, month or a chosen time.

## Inputs

| Name | Type | Default | Range |
| --- | --- | --- | --- |
| source | source | hlc3 |  |
| volume | volume | tick |  |
| anchor | choice | session |  |
| anchor_time | text |  |  |
| band_mult | float | 1 | 0 to 10 |
| day_boundary | text | 17:00 America/New_York |  |

## Outputs

| Name | Kind |
| --- | --- |
| vwap | value |
| upper | value |
| lower | value |

Warm-up: 0 bars (0 at the defaults).

Repaints: No.

## Formula

VWAP = the running sum of volume * source over the running sum of volume, from each anchor

upper and lower = VWAP plus and minus band_mult * the volume-weighted standard deviation

A session starts at the day boundary. On forex the volume is tick volume. To anchor at a bar found in code, call it on the data from that bar.
