Ranked Order Block Zones (Zeiierman)█ Overview
Ranked Order Block Zones (Zeiierman) is an advanced Order Block engine that transforms traditional OB detection into a dynamic ranking and prioritization system.
Instead of displaying every detected Order Block equally, the script stores each zone as a structured data object, evaluates its quality in real time using multiple market factors, and continuously ranks all active zones based on their relative strength.
The result is a cleaner, more intelligent Order Block framework that focuses attention on the highest-quality institutional zones currently influencing price action.
█ How It Works
⚪ Structured Order Block Engine
Each detected Order Block is stored as a structured UDT object containing its price range, direction, size, mitigation state, volume behavior, trend alignment, internal strength, and overall quality score. This allows every zone to behave like an active market structure rather than a static drawing.
The script detects Order Blocks using candle-flip structures combined with ATR-normalized body validation, allowing the system to automatically adapt across different assets, volatility conditions, and timeframes.
⚪ Dynamic Quality Ranking
Every Order Block receives a continuously updated quality score based on:
• Zone size relative to ATR
• Volume expansion
• EMA trend alignment
• Candle displacement strength
• Mitigation progress
• Zone age decay
All Order Block objects are stored inside an array and ranked using Pine Script’s native UDT collection sorting:
obs.sort(order.descending, sort_field = "qualityScore")
This allows the script to dynamically reorder all active zones in real time, prioritizing the strongest institutional areas while weaker zones gradually lose ranking.
⚪ Smart Zone Management
After sorting, only the highest-ranked Order Blocks are displayed on the chart while lower-quality zones remain internally tracked but hidden from view. The script can also merge overlapping zones of the same direction to reduce clutter and create a cleaner institutional structure.
Each zone continuously tracks mitigation progress. As price trades deeper into an Order Block, its quality score weakens until fully mitigated zones are automatically removed.
⚪ Internal Strength Distribution
Every Order Block contains bullish and bearish internal pressure components displayed as live strength bars inside the zone.
These help visualize:
• Directional dominance
• Continuation potential
• Structural weakness
• Opposing pressure developing inside the zone
█ How to Use
⚪ Focus on Top-Ranked Zones
Only the strongest Order Blocks are displayed based on current market conditions and quality ranking.
⚪ Read Internal Strength Bars
• Strong directional dominance → higher continuation probability
• Balanced pressure → weaker structure
• Opposing pressure growth → increasing failure risk
⚪ Watch for Retests
Order Blocks become most useful when price revisits the zone after the initial displacement move.
Strong retests often show:
• Immediate reaction from the zone
• Strong directional continuation
• Respect of internal strength alignment
Deeper or repeated retests can weaken the zone over time as mitigation increases and quality decays.
█ Related Scripts
Ranked FVG Imbalance Zones (Zeiierman)
█ Settings
Show Top Zones: Controls how many of the highest-ranked Order Blocks are displayed.
Max Stored OBs: Controls how many Order Blocks are tracked internally.
Volume MA Length: Defines the baseline used for volume expansion scoring.
Trend EMA Length: Defines the EMA used for trend alignment scoring.
Min Flip Body ATR: Defines the minimum candle body size required for valid Order Block creation.
Merge Overlapping OBs: Enables automatic merging of overlapping zones.
Max Merge Size ATR: Prevents merged zones from becoming excessively large.
-----------------
Disclaimer
The content provided in my scripts, indicators, ideas, algorithms, and systems is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
Pine Script® indicator



















