Volume Pressure Bars


This indicator transforms the normal volume bars into buying and selling segments. This allows the user to easily see how much buying and selling pressure is occurring on any given timeframe. The buying and selling pressure values are calculated using the following equations:

buyingPressure = volume * (close - low) / (high - low)
sellingPressure = volume * (high - close) / (high - low)

Moving Average Line

Also included in this indicator is the optional moving average line. This allows the user to easily see if volume is above or below the average line. All aspects of the moving average line can be adjusted. The line can be toggled on & off, the length of the moving average can be adjusted, the mathematical smoothing function can be chosen, and the color & style of the line can be configured.


If the volume pressure bars are displayed on the same “pane” as the price candles, then the volume bars can be scaled up or down. In the Input settings check the “Scale Bars” checkbox. Then increase the “Scaling Factor” number to make all of the volume bars smaller (to allow more room on your chart) or decrease the number to make the volume bars bigger.

IMPORTANT NOTE #1: scaling only works when the volume pressure bars are in the same pane as the price candles. If the volume pressures bars are in their own pane, then the “Scale Bars” toggle has no effect.

IMPORTANT NOTE #2: if the volume pressure bars are in the same pane as the price candles then there will be a sizable gap between the bottom of the volume bars and the time axis on the TradingView chart. This IS NOT a bug in this indicators code. The gap IS a bug in the TradingView platform that affects all volume indicators besides the default volume indicator that comes with each blank chart. To remove the gap then move the “_Vol Bars” indicator to its own pane above or below the main pain.

Volume Numbers

In Pine Script there is not a true stacked bar chart plot. What the author has to use are multiple bar charts that are in front and behind each other. This gives the impression that the bars are truly stacked because the selling pressure is always smaller than the total volume on any given bar. There is no issue to visually look at the bars and see their heights but if the user used their cursor to hover on a bar to get the actual volume pressure values it leads to issues. To address this problem the author has created a third invisible bar called “Buy Vol Label” that is the buy pressure volume value. Thus when the user hovers the cursor over a bar the first value (from left to right) is the total volume for the bar, the second value is the sell pressure, the third value is the buy pressure, and the fourth value (if toggled on) is the moving average value.

Script de código abierto

Siguiendo el verdadero espíritu de TradingView, el autor de este script lo ha publicado en código abierto, para que los traders puedan entenderlo y verificarlo. ¡Un hurra por el autor! Puede utilizarlo de forma gratuita, aunque si vuelve a utilizar este código en una publicación, debe cumplir con lo establecido en las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.

Exención de responsabilidad

La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.

¿Quiere utilizar este script en un gráfico?