OPEN-SOURCE SCRIPT

Volume Price Trend (VPT)

Theo BiggWigg
Cập nhật

The Volume Price Trend (VPT) is a technical analysis indicator that combines price and volume data. It's used to identify the direction of a trend or to confirm the strength of a trend. The indicator was developed on the premise that volume often precedes price.

Working of VPT:

VPT is calculated by adding or subtracting a multiple of the percentage change in the share price trend and current volume, depending upon the direction of the share price. The starting point of the VPT line is arbitrary.

The formula for calculating VPT is:

VPT = Previous VPT + Volume x (Today's Close - Previous Close)

This formula adds the total volume traded on the days the price went up, and subtracts the total volume on the days the price went down.

For each period:

If the closing price is higher than the previous closing price, the volume for that period is added to the previous VPT.
If the closing price is lower than the previous closing price, the volume for that period is subtracted from the previous VPT.
If the closing price is the same as the previous closing price, the volume for that period does not affect the VPT (i.e., it remains the same as the previous VPT).

Usage and Interpretation of VPT:

The primary use of the VPT is to help confirm the condition of prices. It’s usually used in combination with other technical analysis indicators. Here are some ways traders use the VPT:

Trend Confirmation: A rising VPT line typically confirms an uptrend as it shows that volume is increasing as prices increase. Conversely, a falling VPT line confirms a downtrend.

Divergences: Traders often look for divergences between the VPT and price movements as a sign of upcoming reversals. If prices are rising and the VPT is falling, it suggests that the upward trend may not sustain because it isn't being supported by volume. Similarly, if prices are falling and the VPT is rising, it suggests the downward trend may reverse soon.

Change in Trend: A sudden sharp increase in the VPT could signal a possible change in trend. This is based on the belief that volume changes before price.

In the script provided, the VPT is calculated and then rescaled to a 0-100 scale, which makes it easier to compare across different stocks or time periods. This script also colors the VPT line based on whether it's increasing or decreasing. The color is green when VPT is increasing, and red when it's decreasing.

Enjoy!
Phát hành các Ghi chú
Added an option for smoothing via SMA
Oscillators

Mã nguồn mở

Theo tinh thần TradingView thực sự, tác giả của tập lệnh này đã xuất bản dưới dạng nguồn mở để các nhà giao dịch có thể hiểu và xác minh. Chúc mừng tác giả! Bạn có thể sử dụng miễn phí. Tuy nhiên, bạn cần sử dụng lại mã này theo Quy tắc nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?

Thông báo miễn trừ trách nhiệm