Price Volume Trend on TradingView: formula and limits
The Price Volume Trend indicator (PVT, also called VPT) adds each bar's volume multiplied by its fractional close-to-close price change to a running total. A larger percentage move gets more weight at the same volume. Use the formula and worked example to check a TradingView plot before building signals around it.
PVT[t] = PVT[t-1] + Volume[t] × (Close[t] - Close[t-1]) / Close[t-1]
A 2% rise on volume of 1,000 adds 20. Use 0.02 as the multiplier, not 2.
A five-bar calculation you can reproduce
This hypothetical sequence uses arbitrary volume units, positive closes, and a PVT and OBV seed of zero at bar 0. The seed row establishes the previous close; its volume does not enter the total. Calculations retain full precision and displayed decimals are rounded.
| Bar | Close | Volume | Fractional change | PVT increment | PVT total | OBV total |
|---|---|---|---|---|---|---|
| 0 (seed) | 100.00 | 1,000 | Not calculated | 0 (seed) | 0 | 0 |
| 1 | 102.00 | 1,000 | +0.0200 (+2%) | +20 | 20 | 1,000 |
| 2 | 101.49 | 2,000 | -0.0050 (-0.5%) | -10 | 10 | -1,000 |
| 3 | 101.49 | 3,000 | 0.0000 (0%) | 0 | 10 | -1,000 |
| 4 | 100.00 | 1,000 | -0.01468125 (-1.468125%) | -14.68125 | -4.68125 | -2,000 |
At bar 2, 2,000 × (101.49 - 102) / 102 = -10, so PVT falls from 20 to 10. Bar 3 contributes zero despite its larger volume because the close is unchanged. At bar 4, the price returns to 100, while PVT finishes near -4.68125. Equal starting and ending prices do not force a volume-weighted cumulative sum back to zero.
The starting value is a convention
The recurrence needs a seed and a valid previous close. Setting the seed to 500 instead of zero adds 500 to every later total in this example; the increments remain identical. The table's seed convention does not assert that the first plotted value of every implementation is zero. When comparing a manual calculation with ta.pvt, match the history and inspect the first available values.
PVT has no fixed overbought or oversold range. Its level depends on the seed, prior contributions, and volume units. Starting a calculation later can shift its baseline. Compare changes over the same interval before treating an absolute difference as a calculation error.
Price Volume Trend in Pine Script v6
Open TradingView's Pine Editor, paste the complete script, save it, and add it to the chart. The code plots the built-in ta.pvt series in a separate pane. ta.pvt is a variable used without parentheses; this script adds no custom seeding, missing-data replacement, or session reset.
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Pineify
//@version=6
indicator(title="Price-Volume Trend", overlay=false, max_labels_count=500)
// ta.pvt is a built-in series float variable, used without parentheses.
// It accumulates volume weighted by the fractional close-to-close change.
p_ind_1 = ta.pvt
plot(p_ind_1, title="PVT", color=color.rgb(41, 98, 255, 0), linewidth=1)Copy the complete script into the TradingView Pine Editor.
The base calculation has no lookback input. Color and line width change the display only. An EMA signal line, a custom reset, or a confirmed-bar alert would require additional rules. A syntax check establishes that the source is accepted; checking chart values is a separate step.
For a manual audit, select two adjacent closed bars with valid volume and a nonzero previous close. Compute the weighted increment and compare it with the change in plotted PVT using the Data Window. Repeat across an unchanged close and a down bar. Record the symbol's exchange, timeframe, session, and adjustment settings with the result.
PVT versus OBV: the weight changes
OBV adds all volume on an up close and subtracts all volume on a down close; an equal close adds zero. PVT uses the size of the fractional price change. In the example, bar 2 subtracts 2,000 from OBV but only 10 from PVT. The numerical scales are different, so comparing their raw heights says little about which rule is useful.
At the same volume of 1,000, a +0.2% bar adds 2 to PVT and a +3% bar adds 30. Both add 1,000 to OBV. That arithmetic explains the different weighting; it does not establish that PVT has fewer false signals or better returns.
Adjusted prices can change the comparison
TradingView adjusts historical stock prices for splits. As a formula example, an unadjusted move from 100 to 50 at a 2-for-1 split looks like -50%. With current volume of 1,000 it would subtract 500 from PVT and 1,000 from OBV. If the prior close is adjusted to 50, the same current close has zero change and both increments are zero.
Multiplying both adjacent closes by the same positive factor leaves their fractional change unchanged. The problem is inconsistent adjustments across the event, or a change in the volume series. Verify the provider's price and volume conventions before comparing exports or feeds; PVT does not repair those differences.
Data checks and signal limits
Missing volume differs from zero volume
Pine uses na when a bar has no volume data. A reported zero volume produces a zero increment when the price inputs are valid. Missing volume provides no usable weighted increment. Replacing na with zero silently treats unavailable activity as none. A custom implementation should state whether it pauses, restarts, or marks the result unavailable after a gap.
A zero previous close has no valid denominator
The formula cannot calculate a return when the previous close is zero. Flag the bar and define a recovery policy instead of dividing by a tiny substitute. For instruments with negative prices, the arithmetic also loses the usual positive-price interpretation: a rise from -10 to -5 gives a fractional change of -0.5.
Use a consistent chart and confirmation time
The open bar's price and volume can change, so its PVT contribution can change too. If a signal must use completed bars, require barstate.isconfirmed in the chart context. Standard candles and synthetic chart prices can produce different inputs. Changing timeframe also regroups returns and volume, so a daily PVT is not the sum of intraday PVT totals.
Define divergence before testing it
A higher price high paired with a lower PVT high is a bearish divergence under that swing definition. Specify the two swing bars and any right-side bars needed to confirm them. A label drawn back at a pivot does not mean the pivot was known at that time. Divergence alone supplies neither an execution price nor a defined loss limit.
This is a calculation guide, not investment advice. No performance claim follows from the examples.
Write a checkable PVT request for Pineify
Pineify's Pine Script AI Coding Agent can help turn your calculation rules into a script. Give it the formula, volume source, seed or reset convention, and confirmation time. Ask it to expose the per-bar increment so you can check the output before adding trade rules.
Create a Pine Script v6 PVT indicator for standard candles. Plot ta.pvt and a user-selected EMA of PVT. Show the fractional return and weighted increment in the Data Window. Flag missing volume and zero previous closes without substituting zero. Evaluate any crossover alert only on confirmed chart bars. Explain the starting baseline and keep this as an indicator.
Validate the generated source, then inspect adjacent-bar values on the selected chart. If you later build a strategy, define exits, position sizing, commission, and slippage separately. An indicator plot is not a strategy backtest.
Build a PVT script in PineifyPVT questions
Sources and related reading
Official references checked October 17, 2026. Calculation examples are original hypothetical exercises.
- TradingView: Price Volume Trend
- TradingView Pine Script v6: ta.pvt and ta.obv
- TradingView Pine Script: chart information
- TradingView Pine Script: bar states
- TradingView: stock splits and historical prices
Continue with the TradingView indicators guide or compare the bounded scale of the Money Flow Index.