Indicators/probuilder · probacktest · proorder · proscreener

VolumeAdjustedAverage

VolumeAdjustedAverage in ProBuilder returns a moving average weighted by traded volume, so high volume bars pull the line further. Syntax and examples.

Syntax

probuilder
VolumeAdjustedAverage[period](price)

Parameters

NameTypeDefaultDescription
periodinteger20Number of bars in the averaging window.
priceprice sourcenoneSeries to average, typically close. Any price constant or custom variable is accepted.

Formula

code
VAMA = weighted average of price over the window,
       with each bar's weight proportional to its volume

Conceptually, a bar that traded twice the volume of another counts roughly twice as much in the average. The platform performs the volume adjustment internally; the defining property is that weights follow traded volume rather than bar position, as in time-weighted schemes such as WeightedAverage.

How it works

A simple moving average treats a thin holiday session and a heavy earnings-day session as equal inputs. The volume adjusted moving average (VAMA) corrects this by scaling each bar's influence with the volume traded on it. The line therefore gravitates toward the price levels where the most transactions occurred, which many traders read as a better proxy for the market's consensus price than a purely time-based average.

In practice the VAMA behaves like other moving averages, it smooths price and lags it, but it diverges from a simple average of the same period whenever volume is unevenly distributed. A price move on strong volume shifts the VAMA quickly; the same move on weak volume barely bends it. That property is the main analytical value: comparing the VAMA against a simple average of the same period shows whether recent movement was backed by volume.

Rising VAMA readings suggest an advance supported by traded volume; a falling line suggests distribution. The usual moving average toolkit applies, price crossings, slope reading, and fast against slow pairs.

Examples

Example 1, 30-bar VAMA of the close (Indicator)

probuilder
// Volume adjusted moving average over the last 30 bars
myVAMA = VolumeAdjustedAverage[30](close)
RETURN myVAMA

Plots the 30-period volume adjusted average on the price chart. Compared with Average[30](close), the line leans toward high-volume price areas.

Example 2, Price crossing the VAMA (ProOrder)

probuilder
// Trend following on closes crossing the volume adjusted average
vama = VolumeAdjustedAverage[20](close)

IF close CROSSES OVER vama THEN
  BUY 1 CONTRACT AT MARKET
ELSIF close CROSSES UNDER vama THEN
  SELL AT MARKET
ENDIF

A standard crossover system with the VAMA as the reference line. Because the line weights volume, crossovers require price to clear the levels where most trading took place.

Example 3, Volume-backed strength scan (ProScreener)

probuilder
vama = VolumeAdjustedAverage[20](close)
sma = Average[20](close)
SCREENER[vama > sma] ((vama / sma - 1) * 100 AS "VAMA vs SMA %")

Returns instruments whose volume adjusted average sits above their simple average of the same period, indicating that recent high-volume bars traded at higher prices, and ranks them by the spread.

Interpretation

Read the VAMA like any moving average, with one extra dimension. Price above a rising VAMA indicates an uptrend that volume participated in. When the VAMA and a simple average of the same period disagree, volume is concentrated on one side of the window: VAMA above SMA means the heavy-volume bars traded high, often read as accumulation, VAMA below SMA means volume concentrated on weaker prices, often read as distribution. Crossings between price and the VAMA carry the usual trend-change meaning, with the added implication that the level being crossed was defined by actual traded volume.

Common errors and gotchas

  • No usable volume data. The indicator depends on volume. On instruments where the feed provides no volume, or only tick-count approximations such as many spot forex and CFD feeds, the output is meaningless or unavailable. Verify the volume series before relying on it.
  • Wrong bracket type. The period goes in square brackets, the price in parentheses: VolumeAdjustedAverage[30](close). VolumeAdjustedAverage(30, close) does not compile.
  • Session artefacts on intraday charts. Volume follows a strong intraday pattern, heavy at the open and close, thin over lunch. On intraday timeframes the weighting inherits this pattern, which can dominate the signal.
  • Expecting it to lead. The VAMA is still a lagging average. Volume weighting changes which bars matter, it does not remove the lag of the window itself.
  • Average, simple time-weighted moving average.
  • ExponentialAverage, exponentially weighted moving average.
  • WeightedAverage, linear position-based weighting.
  • Volume, the raw volume series used for the weighting.
  • VolumeOscillator, spread between two volume averages.
  • VolumeROC, rate of change of volume.
  • OBV, on balance volume, cumulative volume flow.
  • PVT, price volume trend, volume scaled by price change.
  • MoneyFlow, volume-weighted price pressure measure.