All indicators

Magic Order Blocks

Sep 15, 2024

Static chart image
Support and ResistanceVolume BasedLiquidityVolatility

The Magic Order Blocks indicator identifies and visualizes significant institutional price zones where large orders were previously placed. By filtering order blocks based on the duration of subsequent movement (consecutive candles) and the magnitude of the trend (ATR multiples), it highlights the most relevant support and resistance levels for potential market reversals or continuations.

Usage

The tool simplifies chart analysis by focusing on high-probability order blocks. By default, it displays the most recent overhead bearish block and the nearest bullish block below price.

  • Support/Resistance: Use the highlighted zones to anticipate where price might stall or bounce.
  • Trend Strength: A label to the right of the price provides a visual sequence (bars) indicating how many ATRs or consecutive candles followed the block, helping you gauge the historical momentum behind the level.
  • Historical Analysis: Users can enable background shading to see all valid order blocks. Overlapping backgrounds often indicate high-concurrency zones where support or resistance is likely to be stronger.
  • Detailed Data: For advanced analysis, enabling "Large Order Block Detail Labels" provides specific metrics like price/volume ratios, mid-price, and total price change over the move.

Details

The script functions by creating a matrix of all order blocks that meet the user-defined criteria for consecutive follow-through candles.

  • Refined Filtering: Beyond just counting candles, the indicator can filter by "Mid-Price" (the average of the block's high and low) and price movement relative to volatility (ATR).
  • Volume Analysis: The indicator calculates consecutive accumulated volume following the block to help identify if the institutional move was backed by significant participation.
  • Scalability: Because momentum varies across timeframes, users should adjust the consecutive candle and ATR settings when switching from lower timeframes (e.g., 5m) to higher timeframes (e.g., Daily).

Settings

General Settings

  • Minimum # of Consecutive Bars Following Order Block: The number of bars in the same direction required to validate an order block.
  • Show Bullish/Bearish Order Blocks: Toggles the visibility of the primary levels above or below the current price.
  • Use ATR Filter: When enabled, the script only considers order blocks followed by a specific volatility-adjusted move.
  • Closest OB Followed by This Many ATRs: Sets the threshold for the ATR filter.

Visual Preferences

  • Right Offset of Indicator Label: Adjusts the horizontal spacing of the price labels.
  • Show Mid-Line: Displays a horizontal line extending from the order block's midpoint.
  • Use ATRs Instead of Consecutive Candles: Changes the visual bar representation on labels to reflect volatility units instead of bar counts.
  • Show Large/Small Labels: Toggles detailed data labels or minimalist markers for every identified block.

Background Settings

  • # of Backgrounds to Show Before Now: Controls how many historical zones are shaded on the chart.
  • Show All Bullish/Bearish Backgrounds: Toggles global visibility for historical zone shading.

FAQ

How do I use the ATR filter effectively?

The ATR filter ensures that you only see order blocks that led to "impulsive" moves. If you want to find the most significant reversals, increase the ATR threshold to filter out minor pullbacks.

Why do some order blocks disappear when I change timeframes?

Market structure varies; a 15-minute chart may have many sequences of 5 consecutive candles, whereas a Daily chart may have fewer. You should lower the "Consecutive Bars" setting for higher timeframes.

How can I access this tool?

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.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.