OPEN-SOURCE SCRIPT
Bid/Ask Volume Tension with Rolling Avg

📊 Bid/Ask Volume Tension with Rolling Average
This indicator is designed to help traders identify pivotal moments of buildup, exhaustion, or imbalance in the market by calculating the tension between buy and sell volume.
🔍 How It Works:
Buy volume is approximated when the candle closes higher than or equal to its open.
Sell volume is approximated when the candle closes below its open.
Both are smoothed using an EMA (Exponential Moving Average) for noise reduction.
Tension is calculated as the absolute difference between smoothed buy and sell volume.
A rolling average of tension shows the baseline for normal behavior.
When instant tension rises significantly above the rolling average, it often signals:
A build-up before a large move
Aggressive order flow imbalances
Potential reversals or breakouts
🧠 How to Use:
Watch the orange line (instant tension) for spikes above the aqua line (rolling average).
Purple background highlights show when tension exceeds a customizable multiple of the average — a potential setup zone.
Use this indicator alongside:
Price action (candlestick structure)
Support/resistance
Liquidity zones or order blocks
⚙️ Settings:
Smoothing Length: Controls the responsiveness of buy/sell volume smoothing.
Rolling Avg Window: Defines the lookback period for the baseline tension.
Buildup Threshold: Triggers highlight zones when tension exceeds this multiple of the average.
🧪 Best For:
Spotting pre-breakout tension
Detecting volume-based divergences
Confirming order flow imbalances
This indicator is designed to help traders identify pivotal moments of buildup, exhaustion, or imbalance in the market by calculating the tension between buy and sell volume.
🔍 How It Works:
Buy volume is approximated when the candle closes higher than or equal to its open.
Sell volume is approximated when the candle closes below its open.
Both are smoothed using an EMA (Exponential Moving Average) for noise reduction.
Tension is calculated as the absolute difference between smoothed buy and sell volume.
A rolling average of tension shows the baseline for normal behavior.
When instant tension rises significantly above the rolling average, it often signals:
A build-up before a large move
Aggressive order flow imbalances
Potential reversals or breakouts
🧠 How to Use:
Watch the orange line (instant tension) for spikes above the aqua line (rolling average).
Purple background highlights show when tension exceeds a customizable multiple of the average — a potential setup zone.
Use this indicator alongside:
Price action (candlestick structure)
Support/resistance
Liquidity zones or order blocks
⚙️ Settings:
Smoothing Length: Controls the responsiveness of buy/sell volume smoothing.
Rolling Avg Window: Defines the lookback period for the baseline tension.
Buildup Threshold: Triggers highlight zones when tension exceeds this multiple of the average.
🧪 Best For:
Spotting pre-breakout tension
Detecting volume-based divergences
Confirming order flow imbalances
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
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.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
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.