PINE LIBRARY

WhispererRealtimeVolume

252
Library "WhispererRealtimeVolume"

▮ Overview

The Whisperer Realtime Volume Library is a lightweight and reusable Pine Script® library designed for real-time volume analysis.

It calculates up, down, and neutral volumes dynamically, making it an essential tool for traders who want to gain deeper insights into market activity.

This library is a simplified and modular version of the original "Realtime Volume Bars w Market Buy/Sell/Neutral split & Mkt Delta" indicator by the_MarketWhisperer, tailored for integration into custom scripts.


How bars are classified

- Up Bars
If the current bar’s closing price is higher than the previous bar’s closing price, it is classified as an up bar.

Volume handling:
The increase in volume for this bar is added to the up volume.
This represents buying pressure.

- Down Bars
If the current bar’s closing price is lower than the previous bar’s closing price, it is classified as a down bar.

Volume handling:
The increase in volume for this bar is added to the down volume.
This represents selling pressure.

- Neutral Bars
If the current bar’s closing price is the same as the previous bar’s closing price, it is classified as a neutral bar.

Volume handling:
If neutral volume is enabled, the volume is added to the neutral volume.
If neutral volume is not enabled, the volume is assigned to the same direction as the previous bar (up or down). If the previous direction is unknown, it is added to the neutral volume.


▮ What to look for

Real-Time Volume Calculation: Analyze up, down, and neutral volumes in real-time based on price movements and bar volume.

Customizable Start Line: Add a visual reference line to your chart for better context by viewing the starting point of real-time bars.

Ease of Integration: Designed as a library for seamless use in other Pine Script® indicators or strategies.


▮ How to use

Example code:

Pine Script®
//@version=6 indicator("Volume Realtime from Whisperer") import andre_007/WhispererRealtimeVolume/4 as MW MW.displayStartLine(startLineColor = color.gray, startLineWidth = 1, startLineStyle = line.style_dashed, displayStartLine = true, y1=volume, y2=volume + 10) [volumeUp, volumeDown, volumeNeutral] = MW.mw_upDownVolumeRealtime(true) plot(volume, style=plot.style_columns, color=color.gray) plot(volumeUp, style=plot.style_columns, color=color.green) plot(volumeDown, style=plot.style_columns, color=color.red) plot(volumeNeutral, style=plot.style_columns, color=color.purple)


istantanea


▮ Credits

This library is inspired by the original work of the_MarketWhisperer, whose "Realtime Volume Bars" indicator served as the foundation.

Link to original indicator:
Realtime Volume Bars w Market Buy/Sell/Neutral split & Mkt Delta

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.