OPEN-SOURCE SCRIPT

Price Volume Trend [sgbpulse]

168
1. Introduction: What is Price Volume Trend (PVT)?

The Price Volume Trend (PVT) indicator is a powerful technical analysis tool designed to measure buying and selling pressure in the market based on price changes relative to trading volume. Unlike other indicators that focus solely on volume or price, PVT combines both components to provide a more comprehensive picture of trend strength.

How is it Calculated?

The PVT is calculated by adding or subtracting a proportional part of the daily volume from a cumulative total.
When the closing price rises, a proportional part of the daily volume (based on the percentage price change) is added to the previous PVT value.
When the closing price falls, a proportional part of the daily volume is subtracted from the previous PVT value.
If there is no change in price, the PVT value remains unchanged.
The result of this calculation is a cumulative line that rises when buying pressure is strong and falls when selling pressure dominates.


2. Why PVT? Comparison to Similar Indicators

While other indicators measure volume-price pressure, PVT offers a unique advantage:

PVT vs. On-Balance Volume (OBV):
  • OBV simply adds or subtracts the entire day's volume based on the closing direction (up/down), regardless of the magnitude of the price change. This means a 0.1% price change is treated the same as a 10% change.
  • PVT, on the other hand, gives proportional weight to volume based on the percentage price change. A trading day with a large price increase and high volume will impact the PVT significantly more than a small price increase with the same volume. This makes PVT more sensitive to trend strength and changes within it.

PVT vs. Accumulation/Distribution Line (A/D Line):
  • The A/D Line focuses on the relationship between the closing price and the bar's trading range (Close Location Value) and multiplies it by volume. It indicates whether the pressure is buying or selling within a single bar.
  • PVT focuses on the change between closing prices of consecutive bars, multiplying this by volume. It better reflects the flow of money into or out of an asset over time.

By combining volume with percentage price change, PVT provides deeper insights into trend confirmation, identifying divergences between price and volume, and spotting signs of weakness or strength in the current trend.


3. Indicator Settings (Inputs)

The "Price Volume Trend [sgbpulse]" indicator offers great flexibility for customization to your specific needs through the following settings:
  • Moving Average Type: Allows you to select the type of moving average used for the central line on the PVT. Your choice here will affect the line's responsiveness to PVT movements.
    - "None": No moving average will be displayed on the PVT.
    - "SMA" (Simple Moving Average): A simple average, smoother, ideal for identifying longer-term trends in PVT.
    - "SMA + Bollinger Bands": This unique option not only displays a Simple Moving Average but also activates the Bollinger Bands around the PVT. This is the recommended option for analyzing volatility and ranges using Bollinger Bands.
    - "EMA" (Exponential Moving Average): An exponential average, giving more weight to recent data, responding faster to changes in PVT.
    - "SMMA (RMA)" (Smoothed Moving Average): A smoothed average, providing extra smoothing, less sensitive to noise.
    - "WMA" (Weighted Moving Average): A weighted average, giving progressively more weight to recent data, responding very quickly to changes in PVT.
  • Moving Average Length: Defines the number of bars used to calculate the moving average (and, if applicable, the standard deviation for the Bollinger Bands). A lower value will make the line more responsive, while a higher value will smooth it out.
  • PVT BB StdDev (Bollinger Bands Standard Deviation): Determines the width of the Bollinger Bands. A higher value will result in wider bands, making it less likely for the PVT to cross them. The standard value is 2.0.


4. Visual Aid: Current PVT Level Line

This indicator includes a unique and highly useful visual feature: a dynamic horizontal line displayed on the PVT graph.
  • Purpose: This line marks the exact level of the PVT on the most recent trading bar. It extends across the entire chart, allowing for a quick and intuitive comparison of the current level to past levels.
  • Why is it Important?- Identifying Divergences: Often, an asset's price may be lower or higher than past levels, but the PVT level might be different. This auxiliary line makes it easy to spot situations where PVT is at a higher level when the price is lower, or vice-versa, which can signal potential trend changes (e.g., higher PVT than in the past while price is low could indicate strong accumulation).
    - Quick Direction Indication: The line's color changes dynamically: it will be green if the PVT value on the last bar has increased (or remained the same) relative to the previous bar (indicating positive buying pressure), and red if the PVT value has decreased relative to the previous bar (indicating selling pressure). This provides an immediate visual cue about the direction of the cumulative momentum.


5. Important Note: Trading Risk

This indicator is intended for educational and informational purposes only and does not constitute investment advice or a recommendation for trading in any form whatsoever.

Trading in financial markets involves significant risk of capital loss. It is important to remember that past performance is not indicative of future results. All trading decisions are your sole responsibility. Never trade with money you cannot afford to lose.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.