OPEN-SOURCE SCRIPT
Order Blocks v2

Order Blocks v2 – Smart OB Detection with Time & FVG Filters
Order Blocks v2 is an advanced tool designed to identify potential institutional footprints in the market by dynamically plotting bullish and bearish order blocks.
This indicator refines classic OB logic by combining:
Fractal-based break conditions
Time-level filtering (Power of 3)
Optional Fair Value Gap (FVG) confirmation
Real-time plotting and auto-invalidation
Perfect for traders using ICT, Smart Money, or algorithmic timing models like Hopplipka.
🧠 What the indicator does
Detects order blocks after break of bullish/bearish fractals
Supports 3-bar or 5-bar fractal structures
Allows OB detection based on close breaks or high/low breaks
Optionally confirms OBs only if followed by a Fair Value Gap within N candles
Filters OBs based on specific time levels (3, 7, 11, 14) — core anchors in many algorithmic models
Automatically deletes invalidated OBs once price closes through the zone
⚙️ How it works
The indicator:
Tracks local fractal highs/lows
Once a fractal is broken by price, it backtracks to identify the best OB candle (highest bullish or lowest bearish)
Validates the level by checking:
OB type logic (close or HL break)
Time stamp match with algorithmic time anchors (e.g. 3, 7, 11, 14 – known from the Power of 3 concept)
Optional FVG confirmation after OB
Plots OB zones as lines (body or wick-based) and removes them if invalidated by a candle close
This ensures traders see only valid, active levels — removing noise from broken or out-of-context zones.
🔧 Customization
Choose 3-bar or 5-bar fractals
OB detection type: close break or HL break
Enable/disable OBs only on times 3, 7, 11, 14 (Hopplipka style)
Optional: require nearby FVG for validation
Line style: solid, dashed, or dotted
Adjust OB length, width, color, and use body or wick for OB height
🚀 How to use it
Add the script to your chart
Choose your preferred OB detection mode and filters
Use plotted OB zones to:
Anticipate price rejections and reversals
Validate Smart Money or ICT-based entry zones
Align setups with algorithmic time sequences (3, 7, 11, 14)
Filter out invalid OBs automatically, keeping your chart clean
The tool is useful on any timeframe but performs best when combined with a liquidity-based or time-anchored trading model.
💡 What makes it original
Combines fractal logic with OB confirmation and time anchors
Implements time-based filtering inspired by Hopplipka’s interpretation of the "Power of 3"
Allows OB validation via optional FVG follow-up — rarely available in public indicators
Auto-cleans invalidated OBs to reduce clutter
Designed to reflect market structure logic used by institutions and algorithms
💬 Why it’s worth using
Order Blocks v2 simplifies one of the most nuanced parts of SMC: identifying clean and high-probability OBs.
It removes subjectivity, adds clear timing logic, and integrates optional confluence tools — like FVG.
For traders serious about algorithmic-level structure and clean setups, this tool delivers both logic and clarity.
⚠️ Important
This indicator:
Is not a signal generator or financial advice tool
Is intended for experienced traders using OB/SMC/time-based logic
Does not predict market direction — it provides visual structural levels only
Order Blocks v2 is an advanced tool designed to identify potential institutional footprints in the market by dynamically plotting bullish and bearish order blocks.
This indicator refines classic OB logic by combining:
Fractal-based break conditions
Time-level filtering (Power of 3)
Optional Fair Value Gap (FVG) confirmation
Real-time plotting and auto-invalidation
Perfect for traders using ICT, Smart Money, or algorithmic timing models like Hopplipka.
🧠 What the indicator does
Detects order blocks after break of bullish/bearish fractals
Supports 3-bar or 5-bar fractal structures
Allows OB detection based on close breaks or high/low breaks
Optionally confirms OBs only if followed by a Fair Value Gap within N candles
Filters OBs based on specific time levels (3, 7, 11, 14) — core anchors in many algorithmic models
Automatically deletes invalidated OBs once price closes through the zone
⚙️ How it works
The indicator:
Tracks local fractal highs/lows
Once a fractal is broken by price, it backtracks to identify the best OB candle (highest bullish or lowest bearish)
Validates the level by checking:
OB type logic (close or HL break)
Time stamp match with algorithmic time anchors (e.g. 3, 7, 11, 14 – known from the Power of 3 concept)
Optional FVG confirmation after OB
Plots OB zones as lines (body or wick-based) and removes them if invalidated by a candle close
This ensures traders see only valid, active levels — removing noise from broken or out-of-context zones.
🔧 Customization
Choose 3-bar or 5-bar fractals
OB detection type: close break or HL break
Enable/disable OBs only on times 3, 7, 11, 14 (Hopplipka style)
Optional: require nearby FVG for validation
Line style: solid, dashed, or dotted
Adjust OB length, width, color, and use body or wick for OB height
🚀 How to use it
Add the script to your chart
Choose your preferred OB detection mode and filters
Use plotted OB zones to:
Anticipate price rejections and reversals
Validate Smart Money or ICT-based entry zones
Align setups with algorithmic time sequences (3, 7, 11, 14)
Filter out invalid OBs automatically, keeping your chart clean
The tool is useful on any timeframe but performs best when combined with a liquidity-based or time-anchored trading model.
💡 What makes it original
Combines fractal logic with OB confirmation and time anchors
Implements time-based filtering inspired by Hopplipka’s interpretation of the "Power of 3"
Allows OB validation via optional FVG follow-up — rarely available in public indicators
Auto-cleans invalidated OBs to reduce clutter
Designed to reflect market structure logic used by institutions and algorithms
💬 Why it’s worth using
Order Blocks v2 simplifies one of the most nuanced parts of SMC: identifying clean and high-probability OBs.
It removes subjectivity, adds clear timing logic, and integrates optional confluence tools — like FVG.
For traders serious about algorithmic-level structure and clean setups, this tool delivers both logic and clarity.
⚠️ Important
This indicator:
Is not a signal generator or financial advice tool
Is intended for experienced traders using OB/SMC/time-based logic
Does not predict market direction — it provides visual structural levels only
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。