# VWAP

VWAP is an indicator on [Vela](https://vela.luxalgo.com/chart), our next-generation charting platform, written in Pine Script®.

Computes the volume-weighted average price of a session, summing price times volume and dividing by cumulative volume from the anchor point, then resetting at each new period. The anchor defaults to the trading day, with week and month options, and bands can be toggled at plus or minus 1, 2, and 3 standard deviations or fixed percentages around the VWAP line. This is the standard raw implementation of session VWAP with no modifications.

- Indicator in the LuxAlgo Library, by LuxAlgo, published Apr 13, 2020.
- Access: free.
- Concepts: [Session VWAP](https://www.luxalgo.com/library/concept/session-vwap/) (primary)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=pybsq2acfmwm36b82ht38te6
- Page: https://www.luxalgo.com/library/indicator/vwap/

The **VWAP** indicator computes the volume-weighted average price of a session, summing each bar's price multiplied by its volume and dividing by the cumulative volume from the anchor point, then resetting when a new period begins. The anchor defaults to the trading day, with week and month options, and bands can be toggled at plus or minus 1, 2, and 3 standard deviations (or fixed percentages) around the VWAP line. This is the standard, raw implementation of session VWAP with no modifications.

Volume does the weighting: busy bars pull the line far harder than quiet ones, one reason the level is watched so closely intraday.

## How to Trade the VWAP?

- **Price above the VWAP**: the period's average fill sits below price, an intraday bias many traders require before longs.
- **Price below the VWAP**: sellers control the period's average; rallies into the line are candidate fades.
- **Crosses of the VWAP line**: a shift of intraday control, unreliable in thin tape without follow-through.
- **Touches of the outer bands**: often rotate back toward the line in balanced sessions; riding a band marks a one-sided trend.

## VWAP Settings

- **Anchor Period** (default Session): where the calculation resets, at the first bar of each trading day, week, or month.
- **Source** (default hlc3): the price entering the weighted average.
- **Bands Mode** (default Standard Deviation): deviation or fixed-percentage band offsets.
- **Band #1** (default on, multiplier 1.0), **Band #2** (default off, 2.0), **Band #3** (default off, 3.0): toggle each pair and set its distance.
- **Hide VWAP on 1D or Above** (default on): hides the plot on daily and higher timeframes.
- **Bands Fill** (default on): shades the area between each visible band pair.

## VWAP Alerts

Two alert conditions track the line: **Price Crossed Above VWAP** and **Price Crossed Below VWAP**, firing when the close crosses the running average.

## Frequently Asked Questions

### How is session VWAP different from an anchored VWAP?

This build's anchors recur on the calendar (each new session, week, or month restarts the sums automatically), while an anchored VWAP starts from a single hand-picked bar (a gap, a swing point) and never resets on its own.

### Should I use standard deviation or percentage bands?

The Standard Deviation default adapts: bands widen in volatile periods and tighten in quiet ones, keeping touches comparable. Percentage mode is a fixed yardstick for traders who think in set percentage moves.

### Why does the VWAP disappear on daily charts?

Because **Hide VWAP on 1D or Above** is on by default: a Session anchor would restart the calculation on every daily bar, leaving a line that simply tracks price. Disable it to show a Week or Month anchor on daily bars.

## Related indicators

- [Order Flow VWAP Deviation](https://www.luxalgo.com/library/indicator/order-flow-vwap-deviation/) (VWAP Bands): markdown at https://www.luxalgo.com/library/indicator/order-flow-vwap-deviation.md
- [VWAP Periodic Close](https://www.luxalgo.com/library/indicator/vwap-periodic-close/) (Periodic VWAPs): markdown at https://www.luxalgo.com/library/indicator/vwap-periodic-close.md
- [Rolling VWAP Channel](https://www.luxalgo.com/library/indicator/rolling-vwap-channel/) (Rolling VWAP): markdown at https://www.luxalgo.com/library/indicator/rolling-vwap-channel.md
- [VWAP Bands - Event Based](https://www.luxalgo.com/library/indicator/vwap-bands-event-based/) (Anchored VWAP): markdown at https://www.luxalgo.com/library/indicator/vwap-bands-event-based.md
- [Anchored VWAP](https://www.luxalgo.com/library/indicator/anchored-vwap/) (Volume & Order Flow): markdown at https://www.luxalgo.com/library/indicator/anchored-vwap.md
- [VWAP Mean-reversion vs Trend Regimes](https://www.luxalgo.com/library/indicator/vwap-mean-reversion-vs-trend-regimes/) (Volume & Order Flow): markdown at https://www.luxalgo.com/library/indicator/vwap-mean-reversion-vs-trend-regimes.md
- [VWAP Pinch](https://www.luxalgo.com/library/indicator/vwap-pinch/) (Volume & Order Flow): markdown at https://www.luxalgo.com/library/indicator/vwap-pinch.md
- [Midpoint/half-back of Session](https://www.luxalgo.com/library/indicator/midpoint-half-back-of-session/) (Volume & Order Flow): markdown at https://www.luxalgo.com/library/indicator/midpoint-half-back-of-session.md

---

Source: https://www.luxalgo.com/library/indicator/vwap/ (LuxAlgo Library). Free to use with attribution: https://www.luxalgo.com/library/license/
