# Order Block Detector

Detects bullish and bearish order blocks from confirmed volume pivots, marking the zones where large orders concentrated before a move. Mitigated blocks are hidden automatically using wick or close logic, and alerts cover both creation and mitigation. Built for price-action traders who want volume-backed zones instead of eyeballed rectangles.

- Indicator in the LuxAlgo Library, by LuxAlgo, published Dec 6, 2022.
- Access: free.
- Concepts: [Bullish/bearish Order Block](https://www.luxalgo.com/library/concept/bullish-bearish-order-block/) (primary), [Order Block Anatomy & Refinement](https://www.luxalgo.com/library/concept/order-block-anatomy-and-refinement/)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=cmpwn4bhd0061vhsg1q8dx50f
- Page: https://www.luxalgo.com/library/indicator/order-block-detector/

**Order Block Detector** finds the footprints that phased, large-scale order execution leaves on lower timeframes, plotting [order blocks](https://www.luxalgo.com/library/concept/bullish-bearish-order-block/) around confirmed volume peaks. Because every zone is anchored to a volume pivot rather than a visual guess, the blocks mark prices where orders demonstrably concentrated, natural support and resistance for entries and exits.

Zone construction follows a deliberate take on [order block anatomy](https://www.luxalgo.com/library/concept/order-block-anatomy-and-refinement/): bullish blocks, detected in uptrends, span the price low to the median; bearish blocks, detected in downtrends, span the median to the high, with an average level plotted through each zone. Mitigated blocks are hidden automatically so only live zones remain.

## How to Trade the Order Block Detector?

- **Bullish order block below price**: treat the zone as support and watch for longs on a return into it.
- **Bearish order block above price**: a resistance zone for shorts or profit-taking.
- **Average level**: the median of each block acts as its balance point. Reactions there carry extra weight.
- **Alerts**: notifications are available for the creation and mitigation of both bullish and bearish blocks.

Keep in mind that detection is retrospective: a volume peak only confirms after *Volume Pivot Length* bars, so blocks are drawn in hindsight by design.

## Order Block Detector Settings

- **Volume Pivot Length**: lookback of the volume pivot detection; lower values confirm peaks sooner and surface more order blocks.
- **Bullish OB**: how many recent unmitigated bullish blocks stay visible.
- **Bearish OB**: the same display cap for bearish blocks.
- **Mitigation Methods**: "Wick" retires a block when a wick trades beyond it; "Close" waits for a close beyond the zone.
- **Average Line Style & Width**: appearance of the average level.

## Frequently Asked Questions

### Should I use Wick or Close mitigation?
"Wick" reacts to any excursion through the zone, retiring blocks aggressively, while "Close" tolerates wicks and only invalidates on a decisive close beyond. Pick by how you treat wicks in your own analysis: strict invalidation or stop-hunt tolerance.

### How is this different from Order Blocks & Breaker Blocks?
This build anchors zones to volume pivots and clears them at mitigation. [Order Blocks & Breaker Blocks](https://www.luxalgo.com/library/indicator/order-blocks-breaker-blocks/) detects blocks from swing points instead and keeps a broken zone on the chart as a breaker, so the two suit different workflows.

### Is the Order Block Detector free?
Yes. It's a free LuxAlgo indicator. You can load it into Quant, our coding agent, straight from this page to test how its zones behave on your market. You can also copy the source code from this page and run it anywhere Pine Script® runs.

## Related indicators

- [Order Blocks & Breaker Blocks](https://www.luxalgo.com/library/indicator/order-blocks-breaker-blocks/) (Bullish/bearish Order Block): markdown at https://www.luxalgo.com/library/indicator/order-blocks-breaker-blocks.md
- [Dynamic Order Blocks](https://www.luxalgo.com/library/indicator/dynamic-order-blocks/) (Bullish/bearish Order Block): markdown at https://www.luxalgo.com/library/indicator/dynamic-order-blocks.md
- [ICT Concepts](https://www.luxalgo.com/library/indicator/ict-concepts/) (Bullish/bearish Order Block): markdown at https://www.luxalgo.com/library/indicator/ict-concepts.md
- [Price Action Concepts](https://www.luxalgo.com/library/indicator/luxalgo-price-action-concepts/) (Bullish/bearish Order Block): markdown at https://www.luxalgo.com/library/indicator/luxalgo-price-action-concepts.md
- [LuxAlgo - Screener (PAC)](https://www.luxalgo.com/library/indicator/luxalgo-screener-pac/) (Bullish/bearish Order Block): markdown at https://www.luxalgo.com/library/indicator/luxalgo-screener-pac.md
- [ICT Propulsion Block](https://www.luxalgo.com/library/indicator/ict-propulsion-block/) (Bullish/bearish Order Block): markdown at https://www.luxalgo.com/library/indicator/ict-propulsion-block.md
- [Smart Money Concepts (SMC)](https://www.luxalgo.com/library/indicator/smart-money-concepts-smc/) (Bullish/bearish Order Block): markdown at https://www.luxalgo.com/library/indicator/smart-money-concepts-smc.md
- [Breaker Blocks with Signals](https://www.luxalgo.com/library/indicator/breaker-blocks-with-signals/) (Bullish/bearish Order Block): markdown at https://www.luxalgo.com/library/indicator/breaker-blocks-with-signals.md

---

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