PROTECTED SOURCE SCRIPT
SMC Market Structure (Auto BOS/OB)

SMC Market Structure (Auto BOS/OB)

Overview
SMC Market Structure (Auto BOS/OB) is a market structure tool inspired by Smart Money Concepts. It automatically detects Break of Structure (BOS) events and maps Order Block (OB) zones after structure confirmation.
The script is designed to keep charts clean and focused on key structural shifts and potential reaction areas.
How It Works (Concept Level)
1) Structure Tracking
The script monitors major swing highs and swing lows based on a user-defined sensitivity setting. These swing points act as structure references for validating meaningful breaks.
2) BOS Confirmation with Imbalance Context
A BOS is recorded when price closes beyond a valid swing level.
To reduce noise and wick-based false breaks, BOS is only confirmed after an additional validation step.
BOS confirmation is designed to align with imbalance / FVG context around the break region, helping distinguish genuine displacement from short-lived liquidity sweeps. Additional optional filtering can be used to improve selectivity in choppy conditions.
Note: This description explains the concept without disclosing proprietary calculation details.
3) Automatic Order Block Mapping
After BOS confirmation, the script automatically builds an Order Block zone derived from the relevant structural leg.
Instead of drawing overly broad candle-based blocks, OB boundaries are refined using internal proportional logic to keep zones efficient and closer to actionable reaction areas.
4) OB Lifecycle & Interaction
OB zones extend forward for a limited window (user-controlled)
Zones are invalidated once price interacts/mitigates them
Visual reaction markers appear immediately on interaction (no need to wait for candle close)
Confirmed zones remain stable afterward (non-repainting after confirmation)
Key Features
Automated bullish & bearish BOS detection
OB zones generated from confirmed structural shifts
Adaptive zone refinement (anti-oversizing logic)
Optional imbalance-based selectivity controls
OB auto-expiration and mitigation handling
Clean chart layout and non-repainting confirmation
Settings
Users can customize:
Structure sensitivity
Maximum OB extension length
Zone refinement threshold
Optional selectivity filters
Intended Use
This tool is for analysis and educational purposes. It visualizes structure shifts and potential reaction zones and is best used alongside higher-timeframe bias and risk management.
Disclaimer
This script does not provide financial advice or guaranteed outcomes. Always trade responsibly and manage risk appropriately.
XAUUSD
Overview
SMC Market Structure (Auto BOS/OB) is a market structure tool inspired by Smart Money Concepts. It automatically detects Break of Structure (BOS) events and maps Order Block (OB) zones after structure confirmation.
The script is designed to keep charts clean and focused on key structural shifts and potential reaction areas.
How It Works (Concept Level)
1) Structure Tracking
The script monitors major swing highs and swing lows based on a user-defined sensitivity setting. These swing points act as structure references for validating meaningful breaks.
2) BOS Confirmation with Imbalance Context
A BOS is recorded when price closes beyond a valid swing level.
To reduce noise and wick-based false breaks, BOS is only confirmed after an additional validation step.
BOS confirmation is designed to align with imbalance / FVG context around the break region, helping distinguish genuine displacement from short-lived liquidity sweeps. Additional optional filtering can be used to improve selectivity in choppy conditions.
Note: This description explains the concept without disclosing proprietary calculation details.
3) Automatic Order Block Mapping
After BOS confirmation, the script automatically builds an Order Block zone derived from the relevant structural leg.
Instead of drawing overly broad candle-based blocks, OB boundaries are refined using internal proportional logic to keep zones efficient and closer to actionable reaction areas.
4) OB Lifecycle & Interaction
OB zones extend forward for a limited window (user-controlled)
Zones are invalidated once price interacts/mitigates them
Visual reaction markers appear immediately on interaction (no need to wait for candle close)
Confirmed zones remain stable afterward (non-repainting after confirmation)
Key Features
Automated bullish & bearish BOS detection
OB zones generated from confirmed structural shifts
Adaptive zone refinement (anti-oversizing logic)
Optional imbalance-based selectivity controls
OB auto-expiration and mitigation handling
Clean chart layout and non-repainting confirmation
Settings
Users can customize:
Structure sensitivity
Maximum OB extension length
Zone refinement threshold
Optional selectivity filters
Intended Use
This tool is for analysis and educational purposes. It visualizes structure shifts and potential reaction zones and is best used alongside higher-timeframe bias and risk management.
Disclaimer
This script does not provide financial advice or guaranteed outcomes. Always trade responsibly and manage risk appropriately.
نص برمجي محمي
تم نشر هذا النص البرمجي كمصدر مغلق. ومع ذلك، يمكنك استخدامه بحرية ودون أي قيود - تعرف على المزيد هنا.
Strategy Lab | Gold strategies & indicators.
TradingView scripts: tradingview.com/u/StrategyLAB_/
Youtube Link: youtube.com/@StrategyLab_Gold
TradingView scripts: tradingview.com/u/StrategyLAB_/
Youtube Link: youtube.com/@StrategyLab_Gold
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي محمي
تم نشر هذا النص البرمجي كمصدر مغلق. ومع ذلك، يمكنك استخدامه بحرية ودون أي قيود - تعرف على المزيد هنا.
Strategy Lab | Gold strategies & indicators.
TradingView scripts: tradingview.com/u/StrategyLAB_/
Youtube Link: youtube.com/@StrategyLab_Gold
TradingView scripts: tradingview.com/u/StrategyLAB_/
Youtube Link: youtube.com/@StrategyLab_Gold
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.