Statistical Order Blocks
Mar 7, 2026

The Statistical Order Blocks indicator is a quantitative tool that identifies high-probability supply and demand zones while providing real-time performance statistics for every identified zone. It helps traders distinguish between significant structural pivots and market noise by validating zones through ATR-based displacement and historical win-rate metrics.
Usage
The indicator can be used to identify key areas of interest where institutional activity is likely present. Unlike traditional order block tools, this script provides a data-driven layer to confirm whether a specific type of zone has historically yielded a positive result.
- Zone Identification: Bullish and bearish blocks are automatically plotted based on pivot detection.
- Validation: A zone is only valid if the subsequent price move away from the candle exceeds a specific ATR-based displacement, ensuring market-moving intent.
- Performance Tracking: Users can look at the statistical labels to see the Win Rate and Expected Value (EV) of the current OB type. A positive EV indicates that, historically, similar setups have resulted in a net gain based on the defined Take Profit and Stop Loss ratios.
- Historical Footprint: By enabling "Historical OBs," traders can view mitigated zones to analyze how price interacts with legacy structures.
Details
The script uses a rolling historical accumulator to simulate outcomes for every valid order block across the chart's full history. This creates a robust sample size for the statistical engine.
To maintain visual clarity, the tool includes Zone Height Normalization. This feature rescales every order block to a uniform height (a multiple of ATR), preventing oversized candles from cluttering the chart and allowing for objective interaction analysis. The engine calculates "Probability of Touch" and "Expected Value" by simulating trades from the moment an OB is confirmed until it hits a target, a stop, or reaches the maximum bar limit.
Settings
Order Block Detection
- Swing Detection Length: The number of bars required to confirm a pivot high or low.
- OB Candle Lookback: How many bars before the pivot the engine searches for the initial order block candle.
- Displacement Multiplier (ATR): The minimum distance price must move away from the zone to validate it as a high-intent move.
Zone Height Normalization
- Normalize All Zone Heights: Toggles whether all boxes should be resized to a consistent height.
- Zone Height (ATR Multiplier): Defines the standardized height of the plotted zones.
Statistical Analysis Engine
- Take Profit (ATR Multiplier): Sets the distance for the simulated profit target.
- Stop Loss (ATR Multiplier): Sets the distance for the simulated stop loss.
- Max Bars to Simulate Outcome: The duration the engine will track a zone before considering the simulation expired.
Visualization
- Max Active OBs Per Side: Limits the number of visible active zones.
- Show Historical OBs: Displays past, mitigated zones in a faded format.
- Show Statistical Labels: Toggles the information boxes containing Win Rate, EV, and R:R data.
FAQ
How do I interpret the Expected Value (EV)? A positive EV suggests that the current configuration of order blocks has a statistical edge over a large sample size on your current chart.
Which timeframes are best for this tool? The indicator is designed for timeframes and assets that exhibit clear swing structures, such as M30, H1, or H4 on Indices, Forex Majors, and Gold.
How do I access Statistical Order Blocks? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.