OPEN-SOURCE SCRIPT
🟡 GOLD 4H HUD v12 — Time-Safe Nuclear Edition

🟡 GOLD 4H HUD v12 — Time-Safe Nuclear Edition
A full–scale Smart Money Concepts (SMC) analytics engine designed exclusively for XAUUSD on the 4-Hour timeframe.
This script combines market structure, liquidity, displacement, order blocks, imbalance, volume profile, SMT divergence, and institutional behavior modeling into a single unified HUD.
Built with a time-safe architecture, all structural elements (OB/FVG/Sweep) are stored by timestamp to minimize repainting and preserve event integrity.
📌 Core Features (12 Modules + Full HUD)
1 — Market Structure Engine
Automatically detects:
HH / HL / LH / LL
BOS (Break of Structure)
MSS (Market Structure Shift)
CHOCH (Change of Character)
Real swing pivots & trend state
2 — Sweep Engine (Liquidity Grab Detection)
Identifies institutional liquidity grabs:
Break + reclaim of highs/lows
ATR-filtered invalidation
Displacement-backed sweeps
3 — Time-Safe FVG Engine
Detects Bullish/Bearish Fair Value Gaps
ATR-tolerant FVG logic
Automatic right-extension
Auto-delete when filled or invalid
4 — Time-Safe Order Block Engine
Demand & Supply OB detection
Strength classification (Weak vs Strong)
FVG-overlap confirmation
Timestamp-locked (non-repainting)
5 — Volume Profile Engine (HVN / LVN / POC)
Real-time micro-profile:
High Volume Node (HVN)
Low Volume Node (LVN)
Point of Control (POC)
6 — SMT Engine (Gold vs DXY Divergence)
Smart Money Divergence built-in:
Bullish SMT
Bearish SMT
Directional confirmation with zero lag
7 — Displacement Engine
Measures institutional impulse:
Body-based impulse detection
Multi-leg continuation signals
FVG continuation moves
Generates displacement score
8 — Premium / Discount Model
Auto-classifies price into:
Discount (Buy zone)
Premium (Sell zone)
9 — SMC Trend Engine (Score-Based)
Combines 10+ factors:
Structure
FVG
OB power
Displacement
POC positioning
SMT conditions
Outputs:
BULL / BEAR / RANGE
Full scoring system
10 — Institutional Imbalance Model (IMB Engine)
Combines:
PD zones
Sweep direction
Displacement
SMT
OB strength
CHOCH/MSS
A complete institutional bias filter.
11 — Entry Engine (Signal Fusion Model)
Entry conditions fuse:
Sweep
CHOCH
Displacement
OB strength
FVG alignment
SMT confirmation
Also outputs:
Suggested SL/TP
Entry score
12 — Trendline Engine
Auto-draws:
HL → HL bullish trendlines
LH → LH bearish trendlines
+ Full Nuclear HUD
Displays:
Market structure
Trend direction
SMT / CHOCH / MSS
FVG / OB zones
HVN / LVN / POC
Liquidity strength
Entry model
Liquidity Magnet direction
SL/TP map
A complete institutional dashboard in one place.
⚠ Usage Requirement
This script is designed ONLY for the 4H timeframe.
✨ Summary
GOLD 4H HUD v12 — Time-Safe Nuclear Edition
is not just an indicator.
It is a full institutional-grade SMC analysis system, built specifically for Gold.
If you trade XAUUSD on the 4H timeframe —
this is your complete market intelligence HUD
A full–scale Smart Money Concepts (SMC) analytics engine designed exclusively for XAUUSD on the 4-Hour timeframe.
This script combines market structure, liquidity, displacement, order blocks, imbalance, volume profile, SMT divergence, and institutional behavior modeling into a single unified HUD.
Built with a time-safe architecture, all structural elements (OB/FVG/Sweep) are stored by timestamp to minimize repainting and preserve event integrity.
📌 Core Features (12 Modules + Full HUD)
1 — Market Structure Engine
Automatically detects:
HH / HL / LH / LL
BOS (Break of Structure)
MSS (Market Structure Shift)
CHOCH (Change of Character)
Real swing pivots & trend state
2 — Sweep Engine (Liquidity Grab Detection)
Identifies institutional liquidity grabs:
Break + reclaim of highs/lows
ATR-filtered invalidation
Displacement-backed sweeps
3 — Time-Safe FVG Engine
Detects Bullish/Bearish Fair Value Gaps
ATR-tolerant FVG logic
Automatic right-extension
Auto-delete when filled or invalid
4 — Time-Safe Order Block Engine
Demand & Supply OB detection
Strength classification (Weak vs Strong)
FVG-overlap confirmation
Timestamp-locked (non-repainting)
5 — Volume Profile Engine (HVN / LVN / POC)
Real-time micro-profile:
High Volume Node (HVN)
Low Volume Node (LVN)
Point of Control (POC)
6 — SMT Engine (Gold vs DXY Divergence)
Smart Money Divergence built-in:
Bullish SMT
Bearish SMT
Directional confirmation with zero lag
7 — Displacement Engine
Measures institutional impulse:
Body-based impulse detection
Multi-leg continuation signals
FVG continuation moves
Generates displacement score
8 — Premium / Discount Model
Auto-classifies price into:
Discount (Buy zone)
Premium (Sell zone)
9 — SMC Trend Engine (Score-Based)
Combines 10+ factors:
Structure
FVG
OB power
Displacement
POC positioning
SMT conditions
Outputs:
BULL / BEAR / RANGE
Full scoring system
10 — Institutional Imbalance Model (IMB Engine)
Combines:
PD zones
Sweep direction
Displacement
SMT
OB strength
CHOCH/MSS
A complete institutional bias filter.
11 — Entry Engine (Signal Fusion Model)
Entry conditions fuse:
Sweep
CHOCH
Displacement
OB strength
FVG alignment
SMT confirmation
Also outputs:
Suggested SL/TP
Entry score
12 — Trendline Engine
Auto-draws:
HL → HL bullish trendlines
LH → LH bearish trendlines
+ Full Nuclear HUD
Displays:
Market structure
Trend direction
SMT / CHOCH / MSS
FVG / OB zones
HVN / LVN / POC
Liquidity strength
Entry model
Liquidity Magnet direction
SL/TP map
A complete institutional dashboard in one place.
⚠ Usage Requirement
This script is designed ONLY for the 4H timeframe.
✨ Summary
GOLD 4H HUD v12 — Time-Safe Nuclear Edition
is not just an indicator.
It is a full institutional-grade SMC analysis system, built specifically for Gold.
If you trade XAUUSD on the 4H timeframe —
this is your complete market intelligence HUD
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.