How it works
A simple moving average gives every bar in its window the same vote. That is a strange assumption: a session in which fifty million shares traded and one in which three million traded plainly do not carry the same information about where the market values an instrument. The volume weighted moving average fixes exactly that, weighting each bar's price by its own volume before averaging.
Mechanically it is a rolling version of VWAP. VWAP accumulates from a session or an anchor and never lets go of the early data; VWMA looks back a fixed number of bars and drops the oldest as each new one arrives. That makes it usable on any timeframe, including daily and weekly charts where a session-resetting VWAP has nothing to accumulate, and it makes it directly comparable with the other moving averages.
The most informative way to use it is as a pair. Plot a VWMA and a simple moving average of the same length on the same chart. When the VWMA is above the SMA, the higher-priced bars in the window are the ones that carried the volume — buyers were active at the top of the range. When it is below, the heavy trade happened at the lower prices. The gap between the two lines is a compact reading of whether volume has been supporting the direction of price, and it tends to widen ahead of the resolution of a range.
As a standalone trend line it behaves like a slightly more responsive SMA in active markets and identically to one in quiet stretches, since equal volumes reduce it to an equal-weight average. Traders use it in the same three ways as any average: price relative to the line as a coarse regime read, the slope as direction, and crossovers between two lengths as a discrete trigger.
The trade-off it makes is different from the one an exponential average makes. An EMA weights by recency, which reduces lag but amplifies noise. A VWMA weights by participation, which does not systematically reduce lag at all — it simply pulls the average toward the prices where business actually happened. In a market with one gigantic session inside the window, that pull can be large enough to make the line temporarily unrepresentative.
Calculation
The arithmetic in words, in the order it happens.
Over a window of N bars, multiply each bar's price — the close by default — by that bar's volume, sum those N products, and divide by the sum of the N volumes over the same window. The window rolls forward one bar at a time, so the oldest observation leaves the calculation completely rather than decaying away. If volume happens to be identical across the window the weights cancel and the result equals a simple moving average of the same length.
Source
An AlgoBeamScript implementation of the formula above, written by us from the arithmetic so the code and the calculation agree line for line.
Runs unchanged on the platform and in the AlgoBeamTS runtime. The language reference is in the documentation.
Inputs
Defaults are the values most charting packages ship with. They are conventions, not optimal settings — the right length depends on your instrument and your holding period.
| Input | Default | What it changes |
|---|---|---|
| Length | 20 | Number of bars in the window. Shorter lengths hug price and turn quickly at the cost of more false turns; longer ones define regime. Matching the length to an SMA you already use is what makes the two-line comparison meaningful. |
| Source | Close | Which price each bar contributes. Switching to (high + low + close) / 3 makes the line a closer rolling analogue of VWAP, because it approximates the average traded price of the bar rather than its final print. |
| Offset | 0 | Shifts the plotted line forward or back in time. Cosmetic, used for visually comparing alignment; displacing it into the future hides the lag rather than removing it, so it must never be used to justify a rule. |
How to read it
What practitioners take from the plot. Read these as descriptions of market state, not as entry signals.
- VWMA above the simple average of the same length
- The heavy volume in the window occurred at the higher prices. Participation is supporting the upper part of the range, which is the constructive configuration in an advance.
- VWMA below the simple average of the same length
- The bars that carried volume were the lower-priced ones. In a rally this says the advance is happening on light trade while the selling is the part getting participation.
- The two lines converging and interweaving
- Volume is spread evenly across the price range in the window — no side owns the activity. A balance reading, and a poor environment for trend-following rules.
- Price reclaiming a rising VWMA after a pullback
- The correction stopped at the volume-weighted fair value of the last N bars. Used as a continuation reference, with the swing low rather than the line itself as the invalidation.
Limitations
Where this indicator misleads. None of these are fixed by a better parameter.
- It is still a moving average and still lags by roughly half its window. Volume weighting changes which prices dominate, not the fundamental delay that smoothing imposes.
- One extreme-volume session — earnings, an index add, a capitulation — can dominate the entire window and drag the line to a price the market has long since left, then release it abruptly when that bar rolls out.
- It requires trustworthy volume, so it is meaningless on spot forex and unreliable on thinly traded instruments where a handful of prints set the weights.
- In quiet regimes it collapses toward a simple moving average, so the extra complexity buys nothing precisely when markets are calm.
Educational reference. This page explains how an indicator is built and how it is commonly read. It is not investment advice, not a recommendation and not a signal service. No indicator is profitable on its own — each is a way of describing a market, and any rule built on one has to be tested with realistic costs before it is traded.