Appearance
Price Volume Trend
Running total of volume weighted by the percent change.
Kind indicator · Drawn in its own pane
Try it
On the chart, press / and choose Price Volume Trend under Volume. To change it, copy the source below into the AlphaScript editor.
Inputs
| Input | Type | Default |
|---|---|---|
| Color | color | "#2962FF" |
Source
From packages/alphascript/indicators/pvt.as.js.
js
indicator({ name: "Price Volume Trend", shortTitle: "PVT", overlay: false, format: "volume" });
const step = ta.calc([candle.close, candle.volume], (c, v) => { const p = candle.close.at(1); return p ? ((c - p) / p) * v : 0; });
plot(ta.cum(step), { title: "PVT", color: input.color("Color", "#2962FF", { group: "Style" }) });