OPEN-SOURCE SCRIPT
Updated

Volume-Time Imbalance (VTI)

546
Volume-Time Imbalance (VTI) – Indicator Description

This indicator measures the imbalance between traded volume and the time elapsed between bars to identify unusual spikes in volume per second (volume per unit of time). Its purpose is to highlight volume movements that may indicate moments of strong interest, acceleration, or reversal in the market.

How it works:

It calculates the traded volume divided by the time (in seconds) elapsed since the previous bar — thus obtaining the volume per second.

An EMA (exponential moving average) of this volume per second is calculated to smooth the data.

The VTI value is the ratio between the current volume per second and this moving average, showing if the current volume is above what is expected for that pace.

The higher the VTI, the greater the imbalance between volume and time, indicating possible bursts of activity.

Settings:

VTI Moving Average Length: The period of the moving average used to smooth the volume per second (default is 20).

Alert Thresholds: Alert levels to identify moderate and high imbalances (defaults are 1.5 and 2.0).

Show VTI Histogram: Displays the VTI histogram in the indicator window.

Color Background: Colors the indicator background based on the strength of the imbalance (orange for moderate, red for high).

Show Alert Arrows: Shows arrows below the chart when a strong volume spike occurs (high alert).

Interpretation:

VTI values above the moderate level (1.5) indicate an unusual increase in volume relative to time.

Values above the high level (2.0) signal strong spikes that may anticipate significant moves or trend changes.

Use the colors and arrows as visual confirmations to quickly identify these moments.
Release Notes
Update:

Added elegant black background as default for a cleaner look.

Set background offset to 4 to make the end of the indicator more visible.
Release Notes
To better visualize the columns in the indicator, enable logarithmic scale since the columns are narrow.
Release Notes
Update: Based on the growing interest from the community in this indicator, I decided to increase its customization capabilities. Users can now select from different types of moving averages: SMA, SMMA, EMA, WMA, HMA, KAMA, VIDYA, FRAMA, among others.

Additionally, the VIDYA formula has been modified to work properly within the structure of this indicator, since the original version was not compatible with the system used here.

The goal of this update is to offer more analysis options and better adaptability to different trading styles.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.