Skip to content

Volume Weighted Moving Average ​

Mean weighted by each bar's alpha volume.

Kind indicator · Drawn on the price pane

Try it ​

On the chart, press / and choose Volume Weighted Moving Average under Moving averages. To change it, copy the source below into the AlphaScript editor.

Inputs ​

InputTypeDefault
Lengthint20
Sourcesource"close"
Colorcolor"#2962FF"

Source ​

From packages/alphascript/indicators/vwma.as.js.

js
indicator({ name: "Volume Weighted Moving Average", shortTitle: "VWMA", overlay: true });
const length = input.int("Length", 20, { min: 1 });
const src = input.source("Source", "close");
plot(ta.vwma(src, length), { title: "VWMA", color: input.color("Color", "#2962FF", { group: "Style" }) });

AlphaScript language v0.1 · runtime 0.2.0