# Volume Surprise

Volume Surprise is an indicator on [Vela](https://vela.luxalgo.com/chart), our next-generation charting platform, written in Pine Script®.

Volume Surprise scores how far each bar's volume deviates from the level history says is typical for that exact time, plotting actual against expected and projecting the expected path forward. A deviation histogram exposes unusually heavy or quiet participation around news, earnings, and session rhythms.

- Indicator in the LuxAlgo Library, by LuxAlgo, published Oct 22, 2025.
- Access: free.
- Concepts: [Relative Volume](https://www.luxalgo.com/library/concept/relative-volume/) (primary), [Volume Spike](https://www.luxalgo.com/library/concept/volume-spike/), [Intraday Time-of-day Effects](https://www.luxalgo.com/library/concept/intraday-time-of-day-effects/)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=cmpwn793900a7vhsg236y5eub
- Page: https://www.luxalgo.com/library/indicator/volume-surprise/

**Volume Surprise** compares every bar's volume against a statistically expected value for that moment, a time-aware cousin of [relative volume](https://www.luxalgo.com/library/concept/relative-volume/). History is grouped into matching buckets (this hour against past prints of the same 12-hour clock hour, so 09:00 and 21:00 share a bucket; this weekday against the same weekday), each group is summarized, and both actual and expected volume plot on the chart with the expected path projected into upcoming bars. A histogram isolates the deviation itself, usable as a standalone volume-momentum read.

## How to Trade the Volume Surprise?

- **Positive surprise**: volume well beyond expectation often accompanies strong breakouts or event-driven moves and can confirm trend strength.
- **Negative surprise**: participation below the norm for that time (a rally on quiet volume, or a muted reaction to a headline) hints at fading interest.
- **Percentile mode**: a percentile near 100 isolates only the rarest heavy prints (95 flags bars beating 95% of history at that time); near 0 highlights exceptionally quiet conditions.
- **Forecast path**: projected expected volume maps when activity should swell, putting [time-of-day effects](https://www.luxalgo.com/library/concept/intraday-time-of-day-effects/) on the chart before they play out.

Expected values are most trustworthy on assets with firm cyclical rhythms: stocks, futures, forex pairs. Around-the-clock crypto shows weaker periodicity, so its readings deserve more caution.

## Volume Surprise Settings

- **Length**: the maximum historical samples per time group. More history steadies expectations and surfaces recurring patterns.
- **Smooth**: a simple moving-average period applied to volume before it is compared and stored, smoothing the plotted volume, the deviation histogram and the expectations built from it.
- **Auto Selection**: picks period combinations to match the chart timeframe; disable it to group manually by minutes, hours, days, or months.
- **Method / Percentile**: summarizes each group by Mean (default) or by the percentile you set.
- **Forecast Window / Style**: how many future bars of expected volume to project, and how the projection is drawn.

## Frequently Asked Questions

### Should I combine several time periods?

Combining periods (hours with weekdays, say) refines the grouping and can sharpen expectations. Enable too many, though, and each group's sample shrinks until the estimate turns unreliable; Auto Selection handles that balance for you.

### What's the difference from Volume Forecasting?

Volume Surprise judges the bar that just printed against its expectation, while [Volume Forecasting](https://www.luxalgo.com/library/indicator/volume-forecasting/) is dedicated to projecting the path ahead. This tool leans reactive; that one leans anticipatory.

### How can I access Volume Surprise?

It's free through the LuxAlgo Library and runs in Quant, our coding agent, directly from this page. You can also copy the source code from this page and run it anywhere Pine Script® runs.

## Related indicators

- [Volume Forecasting](https://www.luxalgo.com/library/indicator/volume-forecasting/) (Relative Volume): markdown at https://www.luxalgo.com/library/indicator/volume-forecasting.md
- [Periodic Activity Tracker](https://www.luxalgo.com/library/indicator/periodic-activity-tracker/) (Relative Volume): markdown at https://www.luxalgo.com/library/indicator/periodic-activity-tracker.md
- [Volume by Time](https://www.luxalgo.com/library/indicator/volume-by-time/) (Relative Volume): markdown at https://www.luxalgo.com/library/indicator/volume-by-time.md
- [Session Volume Moving Average](https://www.luxalgo.com/library/indicator/session-volume-moving-average/) (Relative Volume): markdown at https://www.luxalgo.com/library/indicator/session-volume-moving-average.md
- [HTF Volume Spike & Imbalance Projection](https://www.luxalgo.com/library/indicator/htf-volume-spike-imbalance-projection/) (Volume Spike): markdown at https://www.luxalgo.com/library/indicator/htf-volume-spike-imbalance-projection.md
- [Volumetric Toolkit](https://www.luxalgo.com/library/indicator/volumetric-toolkit/) (Volume Spike): markdown at https://www.luxalgo.com/library/indicator/volumetric-toolkit.md
- [Power Hour Trendlines](https://www.luxalgo.com/library/indicator/power-hour-trendlines/) (Intraday Time-of-day Effects): markdown at https://www.luxalgo.com/library/indicator/power-hour-trendlines.md
- [Power Hour Breakout Signals](https://www.luxalgo.com/library/indicator/power-hour-breakout-signals/) (Intraday Time-of-day Effects): markdown at https://www.luxalgo.com/library/indicator/power-hour-breakout-signals.md

---

Source: https://www.luxalgo.com/library/indicator/volume-surprise/ (LuxAlgo Library). Free to use with attribution: https://www.luxalgo.com/library/license/
