OPEN-SOURCE SCRIPT

MarketMaulers Order Blocks (Open Source)

1 864
MarketMaulers Order Blocks automatically marks institutional Order Blocks: the last opposing candle before a displacement leg that BREAKS MARKET STRUCTURE (BOS). That candle is where the move was loaded, and price returns to it to fill unfinished business, which is why order blocks act as high-probability support and resistance.

WHY THE BOS REQUIREMENT
An order block is only meaningful if it sits at the origin of a real structure break. The engine ignores random candles and only marks the opposing candle at the origin of a leg that breaks a swing point, so what you see is a genuine order block and not any pullback candle.

WHAT IT MARKS
• Bullish OB · a down candle before an up-move that breaks a swing high, which becomes a demand / support zone
• Bearish OB · an up candle before a down-move that breaks a swing low, which becomes a supply / resistance zone

HOW THE ZONE IS DRAWN
Zones use the full range of the origin candle (wick low to body high for bullish, wick high to body low for bearish), not only the body, because that whole span is the range price defends on the return. When a single displacement candle takes out a run of opposing candles in one shot, the zone spans the WHOLE cluster it engulfed, so the order block reflects all of the supply or demand the move absorbed.

REAL-TIME LIFECYCLE
Every block is tracked live: Fresh (untouched), then Mitigated (tapped once), then Broken (a close through it, the zone is spent). You always know what is still valid.

REFINEMENTS
• OB Origin · choose the Cluster, the Nearest or the Extreme opposing candle
• Optional FVG-confluence filter · require an imbalance after the block
• Kill-zone and displacement filters to cut noise
• Automatic higher-timeframe order blocks · up to 2 HTF slots, each with its own colors, never evicted by lower-timeframe crowding. A higher-timeframe block is judged on its own timeframe's close, so it holds on a lower-timeframe chart exactly as long as it holds on its own

ALERTS
New Bullish OB · New Bearish OB · OB Mitigated · OB Broken

Works on any market and any timeframe.

Display only. This marks zones, it does not fire buy/sell signals. Educational tool, not financial advice.

Published open-source. This is the same indicator as MarketMaulers Order Blocks, published here with the source readable. The swing and break of structure engine, the cluster origin rule, the higher-timeframe slots and the mitigation and break tracking are all in the code. Everything above explains what it marks and how it decides what to mark; the code is there so you can check that the description is accurate rather than take it on faith. Read it, fork it, argue with the constants.

Clause de non-responsabilité

Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.