VWAP Calculator

Written by Dominic Walsh · Published

A VWAP calculator works out the volume weighted average price: the average price paid across a session, with each price weighted by how much traded there. Institutions use it to judge execution quality, and intraday traders use it as a reference for whether price is expensive or cheap relative to the session. This guide covers the formula, how to compute it, and the forex-specific caveat that changes what the number means.

The formula behind a VWAP calculator

VWAP is a running total, recalculated on every bar from the session open.

VWAP = Σ(typical price × volume) ÷ Σ(volume)

The typical price of each bar is (high + low + close) ÷ 3. Multiply that by the bar’s volume, add it to a running sum, and divide by the running sum of volume.

Work through three bars. Bar one: typical price 1.1000, volume 500, so the contribution is 550. Bar two: 1.1020 × 300 = 330.6. Bar three: 1.1010 × 700 = 770.7. Total price-volume is 1,651.3 and total volume is 1,500, so VWAP is 1.10087.

Notice bar three carried the most weight because it had the most volume. That is the whole point: VWAP tells you where the money actually traded, not just where price went.

Why it resets

VWAP is anchored to a session start and accumulates from there. At the next session it resets and begins again.

That reset is essential to how it behaves. Early in a session VWAP moves quickly because few bars feed the average. As the session progresses it stiffens, since each new bar is a smaller share of the accumulated total. By late in the day it barely moves at all.

The practical consequence: VWAP is most useful in the middle and later part of a session. In the first few bars it is jumpy and carries little information.

Session definition matters as much here as it does for pivots. A platform that starts the forex day at 00:00 server time produces a different VWAP than one anchored to the New York close, as covered in our forex time zone converter guide.

The forex volume problem

Read this before relying on the number. VWAP is a volume weighted average, and forex has no real volume figure.

There is no central exchange, so no consolidated volume exists. What your platform labels volume is tick volume: the number of price changes during the bar, taken from your broker’s own feed. It is not contracts, and two brokers show different figures for the same hour.

So a forex VWAP is weighted by activity rather than by size. That is not worthless — busy periods do produce more ticks, and the shape usually tracks a genuine volume-weighted average reasonably well. But it is an approximation, and two traders on different brokers will compute slightly different VWAPs for the same session.

Our volume spread analysis guide covers the tick-volume caveat in more depth. On futures, where real volume is published, VWAP means precisely what it claims to.

Reading it on a chart

Three uses cover most of what traders do with it.

As a bias line. Price above VWAP means buyers have been paying up relative to the session average; below it means the opposite. Many intraday traders take longs only above VWAP and shorts only below, which is a filter rather than a signal.

As a mean-reversion reference. Price stretched far from VWAP often pulls back towards it, particularly in a ranging session. Adding standard deviation bands makes that stretch measurable.

As an execution benchmark. This is the institutional use. A desk filling a large order judges itself against VWAP, and beating it means buying below the session average.

Anchored VWAP is the useful variant. Rather than resetting daily, it starts from a point you choose — a significant high, a news event, a session open — and accumulates from there. Our anchored VWAP vs VWAP guide covers the difference.

Download the complete indicator database

Put these concepts on your charts. One email unlocks the full library of 1,380+ indicators with compiled MT4 and MT5 files, plus my TradingView scripts. No paywall, no spam, unsubscribe any time.

Get free access to my indicator database

One email unlocks 1,380+ free MT4, MT5 and TradingView indicators — the complete library. No single-tool download; you get the whole database.

  • 1,380+ indicators
  • MT4 and MT5 files
  • No spam, unsubscribe any time

Computing it yourself

Most platforms include VWAP, so you rarely need to calculate it by hand. When you do, a spreadsheet handles it in four columns: typical price, volume, the running sum of price times volume, and the running sum of volume. Divide the third by the fourth.

Two settings matter if you use a built-in version. The anchor decides when it resets, and daily is the default. The source is usually the typical price, though some implementations offer the close instead, which changes the result slightly.

Standard deviation bands are worth enabling. They show how far price has stretched from VWAP in statistical terms, which is far more useful than eyeballing the distance.

What it cannot do

VWAP is backward-looking and knows nothing about what is scheduled. A rate decision will push price a long way from the session average and keep it there, which is not a mean-reversion opportunity.

It also degrades on higher timeframes. VWAP is fundamentally an intraday tool, and applying it across weeks accumulates so much volume that the line barely moves and tells you little.

And it is not a signal. Price crossing VWAP happens constantly in a range. The line marks a reference, and the decision still needs structure or a reaction.

Common mistakes

Four repeat. Treating forex tick volume as real volume tops the list, since it changes what the average actually weights. Trading VWAP crosses in a ranging session comes second, which produces constant whipsaw. Third, traders rely on it in the first few bars of a session when it is still jumpy. Fourth, they apply it to multi-week charts where it stops moving.

Where to go next

VWAP works alongside other references. Read anchored VWAP vs VWAP for the more flexible variant, then volume spread analysis for the tick-volume issue in depth. For independent intraday levels, see pivot calculation. To add a custom VWAP to your platform, follow how to install MT4 and MT5 indicators. For further reading, Investopedia explains VWAP at Investopedia, and the volume-weighted average price article on Wikipedia covers the institutional use.

FAQ

How does a VWAP calculator work?

It multiplies each bar’s typical price by that bar’s volume, sums those products from the session open, and divides by the summed volume. The typical price is the high, low and close averaged.

When does VWAP reset?

At the start of each session, usually daily. That reset is why it moves quickly early in a session and barely moves late, when each new bar is a small share of the accumulated total.

Does VWAP work in forex?

Partly. Forex has no real volume, so the calculation is weighted by tick counts from your broker’s feed. The shape usually tracks a true volume-weighted average, but it is an approximation.

What is anchored VWAP?

A version that starts from a point you choose, such as a significant high or a news event, rather than resetting each session. It measures the average price paid since that specific moment.

Is price above VWAP bullish?

It means buyers have paid above the session average, which many traders use as a bias filter. On its own it is not a signal, since price crosses the line constantly in a range.

Which timeframe suits VWAP?

Intraday, typically M5 to H1 within a daily session. Across weeks it accumulates so much volume that the line stops moving. Trading involves risk, results are not guaranteed, and past performance is not indicative of future results.

Dominic Walsh - Forex trader and MT4/MT5 developer

About the author

Written by Dominic Walsh, a Forex trader and MT4/MT5 indicator, Expert Advisor and script developer. Every tool on forexmt4systems.com is tested on live charts before release and ships with ready-to-use compiled MT4 (.ex4) and MT5 (.ex5) files. Learn more about the trader and developer behind this site.

How we build, test and correct every tool: Editorial & Testing Policy. Trading carries risk; see the disclaimer.

Leave a Comment