Appearance
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
| Input | Type | Default |
|---|---|---|
| Length | int | 20 |
| Source | source | "close" |
| Color | color | "#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" }) });