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)

Script de código abierto

Siguiendo fielmente el espíritu de TradingView, el autor de este script lo ha publicado en código abierto, permitiendo que otros traders puedan entenderlo y verificarlo. ¡Olé por el autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la reutilización de este código en la publicación se rige por las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.

¿Quiere utilizar este script en un gráfico?

Exención de responsabilidad