VWMA vs VWAP: Same Formula, Different Anchor

VWMA vs VWAP looks like a choice between two indicators. It is really a choice about where the average starts. Both weight each price by the volume traded at it. The volume weighted moving average (VWMA) rolls forward over a fixed number of bars. The classic volume weighted average price (VWAP) is anchored to a start point, usually the start of the trading day, and grows from there.
Give VWAP a fixed rolling period and the two become the same line. We confirmed it in a backtest: the results matched to the cent. This guide explains why, and when the difference really matters.
What Is the Difference Between VWMA and VWAP?
Both are built the same way. Multiply each bar’s price by its volume, add those up, and divide by total volume. Bars with heavy trading pull the line towards their price.
The difference is the window:
- VWMA: always uses the last N bars. Each new bar enters and the oldest leaves. The line never resets.
- Anchored VWAP: uses every bar since a fixed start. On a stock chart that start is usually the market open. The window grows all day, then the line resets for the next session.
Classic VWAP also tends to use the typical price, the average of high, low and close. VWMA normally uses the close. That changes the line slightly, but the window is the real difference.
Are Rolling VWAP and VWMA the Same?
Yes, when both use the same price and the same period. A rolling 20-bar VWAP on closing prices is a 20-bar VWMA under another name.
Many platforms offer a VWAP setting with a period. That is a rolling VWAP. Arrow Algo’s VWAP block works this way: it takes the close, the volume and a period. So does its VWMA block.
We tested whether that holds in practice. We built one rule in Arrow Algo and ran it twice, once with each block.
How we tested:
- Binance spot, BTC-USDT, 4-hour candles, 1 January 2023 to 1 November 2026
- Rule: hold Bitcoin while the close is above the line, sell to cash when it closes below
- Period 20 for both lines, $10,000 start, whole balance in or out
- 0.1% fee on every fill
| Line | Return | Max drawdown | Round trips | Winning trades |
|---|---|---|---|---|
| VWMA (20) | +6.1% | 59.8% | 512 | 25% |
| VWAP (20, rolling) | +6.1% | 59.8% | 512 | 25% |
| Buy and hold | +369.0% |
Every trade matched, down to the final balance of $10,605.79. If you are choosing between a rolling VWAP and a VWMA with the same settings, you are not choosing anything.
These are hypothetical results on past data. They are not a forecast or a recommendation.
What Does This Backtest Really Show?
The identical rows are the headline. The size of the gap to buy and hold is the second lesson.
The rule flipped in and out 512 times in under four years. That is a trade every few days. Each round trip paid two fees and often bought back higher than it sold. Bitcoin rose about 369% over the period, and the strategy kept roughly 6%.
On its own, a single volume-weighted line is a poor signal. Price crosses it constantly when the market moves sideways. Our whipsaw trading guide covers this failure in detail. The line works better as a filter or a reference level than as an on-off switch.
When Should You Use VWMA or VWAP?
Pick by the job, not the name.
Use a VWMA (or rolling VWAP) when:
- You want a trend line that gives more weight to heavily traded bars.
- You trade around the clock, as in crypto, where there is no natural session start.
- You want to compare it with a plain average. A VWMA above the SMA of the same period means volume is concentrated at higher prices.
Use an anchored VWAP when:
- You trade intraday and care about the average price paid since the open.
- You judge your own fills. Large orders are often measured against the day’s VWAP. Our TWAP vs VWAP execution guide explains that use.
- You anchor to an event, such as a weekly open or a major low, and want the average cost of everyone who traded since.
In crypto, a session needs a convention. Many traders use the daily UTC open. On hourly candles, a rolling 24-bar VWMA gives a rolling one-day volume-weighted price. It is close to a daily VWAP but does not reset at midnight.
What Mistakes Should You Avoid?
- Running both and counting it as two signals. With the same price and period, they are one signal twice.
- Assuming every VWAP resets daily. Check whether your platform’s VWAP is rolling or anchored before you read it.
- Trading every cross. As the backtest shows, a single line crossing gets chopped up in ranges.
- Forgetting fees. A fast rule pays them hundreds of times. See transaction cost modelling.
- Testing one market and one period. One run proves very little. Read about in-sample vs out-of-sample testing.
How to Test VWMA and VWAP in Arrow Algo
You can rebuild this test with visual blocks, without code.
- Add two Data Watcher blocks for your pair and timeframe. Set one to close and one to volume.
- Add a VWMA indicator block. Connect close and volume, and set the period.
- Add a condition block: close greater than the VWMA.
- Connect the true output to a Buy action block and the false output to a Sell action block, with repeat orders off.
- Backtest it, then swap the VWMA block for the VWAP block and run it again.
The two runs should match. From there, try using the line as a filter instead. For example, only allow a moving average crossover to buy while price is above the VWMA. Our VWMA trend strategy and VWAP trading strategy guides show fuller rule sets. If you go live, your rules send signals to your own exchange account and the exchange executes them. See the backtesting docs for each step.
For the standard VWAP definition, see Investopedia’s VWAP guide. For moving averages in general, see Investopedia’s moving average guide.
What Are the Key Takeaways?
- VWMA and VWAP use the same volume-weighted formula. The difference is the window.
- VWMA rolls over a fixed number of bars. Classic VWAP is anchored and resets each session.
- A rolling VWAP with the same price and period is a VWMA. Our backtest results matched to the cent.
- A single price-versus-line rule traded 512 times and kept about 6% while Bitcoin rose 369%.
- Use the line as a filter or reference level, and check which kind of VWAP your platform gives you.
Disclaimer: This content is for educational purposes only and does not constitute financial advice. Trading involves significant risk and you should only trade with capital you can afford to lose. Past performance is not indicative of future results. Always conduct your own research before making any trading decisions.
Ready to build your own automated trading strategies without writing a single line of code? Start for free at Arrow Algo and join thousands of traders who've made the switch to systematic trading.