Ready to go further
Next: price the cost of each trade
The break-even calculator shows the move a trade needs just to cover its spread and fees.
What is included
- What it is, in plain words
- The formula or mechanism, with exact arithmetic
- How it hits grid, martingale and DCA bots
- A check you can run before you switch a bot on
Who it is for
- People who run or plan to run a trading bot
- Anyone reading a backtest or a bot sales page
- Readers who want the numbers, not the pitch
- Not advice, and not a signal service
Key facts
- VWAP is the volume weighted average price: total value traded divided by total volume traded. Heavier bars count for more than lighter ones.
- In the made-up session below the simple average of the six prices is 100.23 and the VWAP is 100.12, because the heaviest volume was at lower prices (calculated by us on 28 Oct 2026, exact).
- It is usually reset at the start of each trading session, so it is an intraday measure, and it is noisy in the first few bars.
- Execution desks use it as a benchmark: a buy below VWAP did better than the average trade that session. It is a yardstick for fills, not a forecast.
- A bot that buys below VWAP and sells above it assumes the price returns to the average. In a trend the price can stay on one side all day.
The formula
For each bar take a price, often the average of the high, low and close, called the typical price, or just the close. Multiply it by the volume of that bar. Add up those values from the start of the session, and divide by the total volume so far.
Simple average = sum of prices / number of bars
A worked example
Take six made-up bars, with prices 100.0, 100.4, 100.9, 100.2, 99.8, 100.1 and volumes 500, 800, 300, 1,200, 1,500, 700. The total volume is 5,000 and the total value is 500600.00. VWAP is 500600.00 / 5,000 = 100.120. The simple average of the six prices is 100.233. VWAP is lower because the two heaviest bars, with volumes of 1,200 and 1,500, were at 100.2 and 99.8, below the lighter ones.
| Bar | Price | Volume | Running VWAP | Running simple average |
|---|---|---|---|---|
| 1 | 100.0 | 500 | 100.000 | 100.000 |
| 2 | 100.4 | 800 | 100.246 | 100.200 |
| 3 | 100.9 | 300 | 100.369 | 100.433 |
| 4 | 100.2 | 1,200 | 100.296 | 100.375 |
| 5 | 99.8 | 1,500 | 100.123 | 100.260 |
| 6 | 100.1 | 700 | 100.120 | 100.233 |
The two lines start together and then pull apart. After bar 3 they are close. After bar 5 the heavy volume at 99.8 has dragged VWAP down faster than the simple average.
VWAP as a benchmark for fills
Suppose a bot bought at 100.25 during that session. The final VWAP was 100.120, so the buy was 0.13 above it, which is 0.130 percent. A buy above VWAP paid more than the average trade did. Over many trades the gap shows whether the bot's fills are good or bad. It is a way to measure slippage against what the market did, not against what the bot expected. For a larger order the point is to avoid pushing the price, and the method is to slice the order over the session.
Why the weighting matters
A simple average treats a quiet bar and a busy bar the same. But most of what was actually traded happened in the busy bars, and those are the prices most people got. VWAP leans toward them. That is why it is used to judge fills: it is a fair guess at what an average participant paid. It also means a single large print can move it, and a thin market can give a VWAP that rests on a few trades. Check that the volume your data feed gives is real traded volume for the instrument. Some markets, such as spot currencies, have no single central volume, so a VWAP there rests on one venue or on tick counts and means less.
How a bot misuses it
- Mean reversion to VWAP. A rule that buys below VWAP and sells above it works in a range. In a trend the price can stay below or above for the whole session, and the bot keeps adding into it. See martingale.
- Early-session noise. In the first few bars the volume is small, so VWAP moves with each bar and means little.
- Different inputs. A close, a typical price and a tick price give different values, and some platforms count the pre-market. Check what yours uses before comparing.
- Costs. A rule that trades each cross pays the spread each time.
How to check a VWAP rule
Test it on separate days, trending and ranging, and count the trades. Use full costs. Keep data back and test once, as in backtesting. Check the max drawdown, which is where a rule that fights a trend shows its cost.
What it does not tell you
It does not say where the price goes next. VWAP is a description of what already traded, and the numbers on this page are made up. It is education, not a signal.
Keep Going
Related Tools and Guides
Keep exploring
FAQ
Frequently Asked Questions
What is VWAP?
The volume weighted average price: total value traded divided by total volume traded, usually from the start of the session. Bars with more volume count for more.
How do you calculate VWAP?
Multiply each bar price by its volume, add those up from the start of the session, and divide by the total volume so far.
How is VWAP different from a moving average?
A moving average weights each bar equally over a fixed window. VWAP weights each bar by its volume and normally restarts each session.
Is buying below VWAP a good sign?
It means the buy paid less than the average trade that session. It does not say the price will rise, and in a downtrend the price can stay below VWAP all day.
Why is VWAP noisy early in the session?
In the first bars little volume has traded, so one bar can move the average a lot. It settles as more volume accumulates.
Are the numbers on this page real?
Example numbers are made up to show how the maths works, and the page says so. A figure only counts as exact when the page says it was calculated on a stated date. Nothing you enter in a calculator leaves your browser.
Can I use this to decide whether to run a bot?
It can show whether a bot's numbers hold together and how much an account can lose. It cannot say what the market will do, and it is not advice. Use it to ask better questions, then read the terms of your own broker or exchange.
Is this financial advice?
No. It is general education about a calculation. The prices and volumes are made up and it is not a signal.
Know the Risk Before You Run It
Free calculators and guides, added every week. Leave your details and we will email you when new ones go up.
Trading carries a risk of loss