OPEN-SOURCE SCRIPT

Price Volume Trendline

The Price Volume Trendline indicator calculates and displays a linear regression trendline based on the product of volume and price (e.g., Volume * Close, Volume * Open, etc.) for a specified timeframe. The indicator helps visualize the relationship between price and volume movements over time.

Note - Please choose a timeframe to display the trendline.

Key Features:

Linear Regression: The trendline is computed using a linear regression of Volume * Price values over a user-defined length (length_trend), providing a smoothed representation of the trend.

Color Coding: The trendline color changes dynamically:
Green: When the slope of the trendline is positive (indicating an uptrend in Volume * Price).
Red: When the slope of the trendline is negative (indicating a downtrend in Volume * Price).
Customizable Timeframe: Users can choose the timeframe for the Volume * Price calculation (either "auto" for the chart's timeframe or a custom timeframe).

This indicator is useful for identifying long-term trends in the relationship between price and volume, highlighting bullish or bearish conditions based on both price and volume dynamics.

Please feel free to share your feedback. That would be appreciated!
Linear RegressionPrice Volume Trend (PVT)

Skrip sumber terbuka

Dalam semangat sebenar TradingView, penulis telah menerbitkan kod Pine ini sebagai sumber terbuka supaya pedagang dapat memahami dan mengesahkannya. Sorakan kepada penulis! Anda boleh menggunakan perpustakaan ini secara percuma, tetapi penggunaan semula kod dalam penerbitan ini adalah dikawal oleh Peraturan dalaman. Anda boleh menyukainya untuk menggunakannya pada carta.

Ingin menggunakan skrip ini pada carta?

Penafian