◆ New — Strategy Validator, Code Fixer & Prop Compliance Checker are live. Try one free →
Home / Indicators / Volume Oscillator
Volume indicator

Volume Oscillator

The percentage gap between a fast and a slow moving average of volume — a measure of volume expansion or contraction, with no directional content.

Illustrative diagram — not live market data.

What it is

The Volume Oscillator answers one narrow question: is trading volume expanding or contracting relative to its own recent norm? It takes a fast moving average of volume and a slow moving average of volume and expresses their difference as a percentage of the slow one. Positive readings mean recent volume is running above its longer-term average; negative readings mean it is running below. That is the entire indicator. Crucially, it says nothing about direction — volume can expand on a rally, a selloff, or a violent range, and the oscillator reads the same. It is plotted in a separate pane around a zero line. One honesty note that matters especially to forex traders: on decentralized spot forex there is no consolidated tape, so the 'volume' your broker feeds the chart is tick volume — a count of price updates on that broker's feed — not actual traded currency. A volume oscillator on such data measures feed activity, which correlates with but is not the same as market-wide participation. As with everything in this library, this is educational material describing a calculation; it is not financial advice, the indicator predicts nothing, and trading always carries risk of loss.

How it works

Compute a fast moving average of volume (commonly a 5-period EMA) and a slow moving average of volume (commonly a 10-period EMA), then: Volume Oscillator = 100 × (fast MA − slow MA) / slow MA. Expressing the difference as a percentage of the slow average, rather than as a raw difference, is what makes readings comparable across instruments and across time — a raw volume difference of one million shares means something completely different on a mega-cap stock than on a small-cap, but '+20% above the slow average' means the same thing everywhere. When a burst of activity hits, the fast average responds first and the oscillator spikes positive; as activity fades back, the fast average decays toward the slow one and the oscillator returns toward zero or goes negative. Some platforms use SMAs instead of EMAs, and defaults vary (5/10 and 14/28 are both common) — the construction is identical either way, only the smoothing differs. One implementation detail a correct version must handle: if the slow average of volume is zero (possible on data gaps or synthetic sessions), the division is undefined and should return na rather than a spurious value. The oscillator is unbounded above (volume can spike to many multiples of its average) but bounded below by −100%.

How traders read it

Common settings

Common defaults are a 5-period fast EMA and a 10-period slow EMA of volume (TradingView's convention); 14/28 SMA variants are also widespread. Shorter pairs react to single-bar volume spikes; longer pairs describe broader participation regimes. Because volume distributions differ enormously across asset classes and sessions, the same settings behave differently on an index future versus an illiquid pair — settings are a lens to understand, not a value to optimize.

Strengths

Pitfalls to watch

Pine v6 example

//@version=6
indicator("Volume Oscillator Example", overlay = false)

fastLen = input.int(5,  "Fast Length", minval = 1)
slowLen = input.int(10, "Slow Length", minval = 1)

fastMa = ta.ema(volume, fastLen)
slowMa = ta.ema(volume, slowLen)

// Percentage difference; guard against a zero slow average
volOsc = slowMa != 0 ? 100 * (fastMa - slowMa) / slowMa : na

plot(volOsc, "Volume Oscillator %", color = color.blue, style = plot.style_histogram)
hline(0, "Zero", color = color.gray)

Pro tip: Use the Volume Oscillator as a question, not an answer: when it spikes, go look at what price structure did on those exact bars — did the expansion accompany a break of a level, or just noise around one? And on forex, periodically compare your broker's tick-volume oscillator against futures volume for the same currency (e.g., CME FX futures) to calibrate how well your feed's activity tracks real participation. This is educational context only, not financial advice; volume expansion describes the past, predicts nothing, and all trading carries risk of loss.

Built an indicator from this? Run it through the Validator to catch look-ahead bias and repainting, or convert a strategy to Pine Script.

Educational only — not financial advice, not a recommendation to trade. No indicator is predictive; trading involves substantial risk of loss.

Catch the bug that compiles.Run auditGet Pro