# Sweep Detection

A Volume & Order Flow concept (Order-flow & microstructure) in the LuxAlgo Library, with 1 indicator implementation.

## What is Sweep Detection?

Sweep detection is the order-flow practice of reconstructing sweeps from the tape: aggressive executions that consume resting liquidity across several price levels almost simultaneously. On time and sales, a sweep appears as a burst of same-direction prints at successively higher (or lower) prices within a very short window, often milliseconds, as one marketable order walks through the book. Detection logic groups prints by timestamp proximity, aggressor side, and stepping price, then merges them into a single event with a total size.

The behavior exists because resting liquidity is stacked in a limit order book: only so much size rests at the best price, so a larger marketable order must walk deeper, level by level, until filled. In fragmented US equities, Reg NMS even defines a dedicated order type for the purpose, the intermarket sweep order, which routes to multiple venues simultaneously rather than waiting for sequential order-protection checks. Options traders monitor the same behavior across exchanges, which is why large multi-venue option sweeps are a staple of flow-tracking services.

A sweep signals urgency: the participant chose immediacy over price, accepting slippage to be filled now. That separates it from patient execution styles that rest limit orders or negotiate size off the book; detectors therefore treat aggression, not size alone, as the interesting fact. Note the naming collision: this microstructure event is not the Smart Money Concepts liquidity sweep, which describes price running stops beyond a swing level rather than an execution style.

Detection quality is bounded by the feed. Separating one genuine sweep from coincidental prints requires sub-second timestamps and reliable aggressor-side inference, exactly the detail that consolidated or throttled feeds blur. That is why chart-based tools often approximate sweeps from lower-timeframe [volume delta](https://www.luxalgo.com/library/concept/volume-delta/) and [volume spikes](https://www.luxalgo.com/library/concept/volume-spike/) rather than raw tape events, and why thresholds tuned on one instrument rarely transfer to another.

## How to identify sweeps on time and sales

Sweeps are read from the tape; the chart supplies context.

1. Watch for bursts: a run of same-side prints landing within milliseconds at successively higher or lower prices, often ending with the quote stepping to a new level.
2. Merge each burst into one event: total the size, note the price range covered and the direction. That aggregate is the sweep, not any single print.
3. Screen for significance: require a minimum total size relative to the instrument's typical prints and a minimum number of levels consumed, or routine activity floods the log.
4. Cross-check the chart: a meaningful sweep usually leaves a footprint in [relative volume](https://www.luxalgo.com/library/concept/relative-volume/) and a step in cumulative delta at the same timestamp.
5. Map the location: events at prior extremes, the [session VWAP](https://www.luxalgo.com/library/concept/session-vwap/), or a [value area](https://www.luxalgo.com/library/concept/value-area/) edge deserve attention; most others resolve to noise.

## How traders use it

- As confirmation of initiative: repeated same-direction sweeps into or through a level suggest aggressive participants are driving, which supports breakout and continuation reads better than passive drift does; many combine this with tape reading or delta tools.
- As an urgency screen against size alone: block trades are large but often negotiated and patient, while a sweep of comparable size implies someone paid up for speed, which is usually the more informative fact.
- As an alert primitive near levels: sweeps firing at a prior high or low, an [anchored VWAP](https://www.luxalgo.com/library/concept/anchored-vwap/), or a value-area edge flag urgent activity exactly where it matters.
- As an absorption test: repeated sell sweeps that fail to produce lower lows imply passive buyers are soaking up the aggression, a print-level cousin of [volume divergence](https://www.luxalgo.com/library/concept/volume-divergence/); the missing price response is the message.
- As a chartable series: summing signed sweep volume over time yields a running line in the spirit of [OBV](https://www.luxalgo.com/library/concept/obv/) but restricted to urgent flow, the construction behind sweep-volume indices. The read stays probabilistic: a sweep proves aggression, not intent, and can be a hedge or an exit as easily as new positioning.

## Sweep detection vs related volume reads

- **Volume Spike** (https://www.luxalgo.com/library/concept/volume-spike/): A volume spike is a bar-level anomaly: far more volume than usual, direction unresolved. A sweep is a print-level event with a known aggressor side and level count. A spike says something happened in the bar; sweep detection says who forced it and how urgently.
- **Volume Delta** (https://www.luxalgo.com/library/concept/volume-delta/): Delta nets buyer-initiated against seller-initiated volume across a bar, so a sweep and its counter-flow can cancel to nothing. Sweep detection keeps the individual event with its size, speed, and range. Delta is the summary line; sweeps are the line items.
- **Volume at Breakout** (https://www.luxalgo.com/library/concept/volume-at-breakout/): Volume at breakout asks whether a level break carried participation, judged from bar totals. Sweep detection answers a finer question: whether someone paid up through the level in one urgent order, often the difference between a driven break and a drift.

## FAQ

### How does sweep detection work on time and sales?

Detectors group prints that share an aggressor side, land within a very short time window (often milliseconds), and step through successive price levels, then merge them into one event with a total size and price range. Thresholds for window length, minimum size, and minimum levels swept vary by tool, market, and feed granularity.

### Is a sweep the same as a liquidity sweep?

No. In microstructure, a sweep is an aggressive order that consumes resting liquidity across multiple book levels or venues at once. In Smart Money Concepts, a liquidity sweep is price trading through a swing high or low to run stops, often reversing afterward. The two vocabularies simply collide; sweep detection targets the order-flow meaning.

### What is an intermarket sweep order?

An ISO is a US equity order type defined under Reg NMS. It routes to multiple exchanges simultaneously, taking displayed liquidity at several venues at once instead of waiting for sequential order-protection routing. ISO executions carry a distinct condition flag in consolidated data, so equity sweep detectors can identify them directly rather than inferring them from timing.

### Do option sweeps predict the underlying's direction?

They mark urgency, not intent. A large call sweep can be a directional bet, a hedge, or one leg of a spread, and the tape does not say which. Research on sweep orders associates urgency with informed trading, which is why flow services track them, but treating every sweep as a directional signal ignores how many are hedges. Price response remains the arbiter.

### What data does sweep detection need?

Tick-level time and sales with sub-second timestamps, plus quotes for aggressor-side inference; venue and condition codes help in equities. Platforms without tick data approximate the idea from one-second or one-minute aggregates, which catches large events but misses fast, small ones; crypto adds the wrinkle that each exchange prints its own tape, so detection runs venue by venue.

## Implementations in the Library

- Sweep Volume Index (LuxAlgo): https://www.luxalgo.com/library/indicator/sweep-volume-index/

## Related concepts

- Volume Delta: https://www.luxalgo.com/library/concept/volume-delta/
- Resting Liquidity / Liquidity Heatmap: https://www.luxalgo.com/library/concept/resting-liquidity-liquidity-heatmap/
- Cumulative Volume Delta: https://www.luxalgo.com/library/concept/cumulative-volume-delta/
- DOM: https://www.luxalgo.com/library/concept/dom/
- Delta Divergence: https://www.luxalgo.com/library/concept/delta-divergence/
- Footprint Concepts: https://www.luxalgo.com/library/concept/footprint-concepts/
- Bid/ask Imbalance: https://www.luxalgo.com/library/concept/bid-ask-imbalance/
- Absorption & Exhaustion: https://www.luxalgo.com/library/concept/absorption-and-exhaustion/
- Unfinished Business: https://www.luxalgo.com/library/concept/unfinished-business/
- Execution Algo Footprints: https://www.luxalgo.com/library/concept/execution-algo-footprints/

---

Source: https://www.luxalgo.com/library/concept/sweep-detection/ (LuxAlgo Library, the encyclopedia of trading & technical analysis). Free to use with attribution: https://www.luxalgo.com/library/license/