Volume Price Trend
Volume weighted by each candle's percent price change, summed over recent candles.
Volume Price Trend over the last length candles: Σ volume × (close − previous close) ÷ previous close. Summed over a rolling window instead of since an arbitrary first candle, so the value is the same after every restart. A previous close of 0 is not ready. Ready at length + 1 candles. Mirror: signed (a mirrored price change has the opposite sign).
Settings
| Setting | Default | Range | What it does |
|---|---|---|---|
| length | 20 | 1 to 5000 | Candles summed. |
What it gives
| Output | What it is |
|---|---|
| vpt | Signed volume × return sum. |
What it reads
It reads the whole candle (open, high, low, close and volume).
Warm-up
With its default settings, Volume Price Trend needs 21 closed candles before its first value. A backtest loads them before its start date, so the first trade can already use it.
Test it
Copy this sentence into the Algonney chat to backtest it:
Backtest a strategy on BTC that uses Volume Price Trend with its default settings