ULTIMATE SMC DASHBOARD — Pro v2.1 (ICT/SMC)

This script is a **complete visual and algorithmic SMC (Smart Money Concepts) analysis system** that:
* Automatically identifies **market structures** (BOS / CHoCH / Liquidity Grab).
* Detects and dynamically maintains **Fair Value Gaps (FVG)** according to **ICT methodology**.
* Draws and tracks the evolution of **Order Blocks (OB)** and **Breaker Blocks (BRK)**.
* Calculates **MACD / Volume divergences**.
* Analyzes **trend, volume, and buyer/seller dominance**.
* Displays a **clear and dynamic dashboard** directly on the chart.
* Builds the foundation for **reversal / continuation probability models**.
---
## ⚙️ 2. Input Parameters
The script is highly configurable. Inputs are organized by sections:
### Structure (ICT)
* **Pivot left/right (swing length)** → determines the swing size for HH/LL detection.
* **OB lookback** → number of candles to look back for an Order Block after a BOS.
* **Show BOS / CHoCH / Liquidity Grab** → enables or disables structural elements.
### Imbalances (FVG)
* Enables the **display of Fair Value Gaps**.
* Manages minimum size, transparency, and **dynamic reduction** when partially filled.
* Limits the **maximum number of FVGs** displayed simultaneously.
### Order Blocks / Breakers
* Enables **Order Blocks** and **Breaker Blocks**.
* Defines their **colors, opacity**, and **dynamic behavior**.
* Automatically removes outdated OBs exceeding the maximum limit.
### Signal & Probabilities
* Sets the **lookback period** for structure calculation.
* Calculates **average volume (MA)** to detect dominance and momentum.
* Defines the **probability threshold** for signals (not yet visible in this snippet).
### RSI / EMA / Divergences / Sentiment
* Prepares additional indicator modules, such as:
* MACD divergence detection
* RSI / EMA visualization
* Market sentiment and funding metrics
---
## 🧠 3. Market Structure Logic (ICT Core)
### a. Pivot Detection
Uses **ta.pivothigh** and **ta.pivotlow** to detect **Higher Highs (HH)** and **Lower Lows (LL)**.
### b. Break of Structure (BOS)
A BOS occurs when price breaks a validated swing high or low:
* **bullBOS** → bullish break.
* **bearBOS** → bearish break.
### c. Change of Character (CHoCH)
A **CHoCH** is detected when BOS direction changes (e.g., a bullish BOS followed by a bearish BOS).
### d. Liquidity Grab
Detection of **liquidity sweeps**:
* **grabUp**: wick above the last high, closing below.
* **grabDown**: wick below the last low, closing above.
All these signals feed into the **main trend bias** (Bull / Bear / Flat).
---
## 🧱 4. Fair Value Gaps (FVG)
The FVG logic strictly follows **ICT principles**:
* **Bullish FVG:** if `low[0] > high[2]`
* **Bearish FVG:** if `high[0] < low[2]`
Each FVG becomes a **dynamic box**:
* Shrinks in real time as price partially fills it.
* Automatically deletes itself once fully closed.
* Color and opacity depend on direction (green = bullish, red = bearish).
This is one of the **most complex parts** of the code, managing:
* Arrays of box objects (`array<box>`)
* Real-time updates for every candle
* Automatic cleanup to prevent chart overload
---
## 🧱 5. Order Blocks (OB) and Breaker Blocks
An **Order Block** is generated:
* After a BOS,
* By identifying the last candle opposite to the trend before the break.
Examples:
* Bullish BOS → Bullish OB = last **red candle** before the breakout.
* Bearish BOS → Bearish OB = last **green candle** before the breakdown.
Each OB:
* Is visualized as a **colored rectangle** (cyan or orange).
* Becomes **inactive** once mitigated (touched).
* Is **removed and converted** into a Breaker Block if invalidated (opposite side broken).
The system uses arrays similar to FVGs to maintain **visual cleanliness** and **chart efficiency**.
---
## 📊 6. Volume and Dominance
The script computes:
* A **moving average (SMA)** of volume.
* Whether the current volume is abnormally **high or low**.
* Whether candles are **buyer- or seller-dominant**.
Simplified display:
* 🔥 **High Volume**
* 📉 **Low Volume**
* 🟩 **Buyers Dominant**
* 🟥 **Sellers Dominant**
* ⚪️ **Neutral**
---
## 🧩 7. Textual Dashboard
Text variables such as:
* `struct_txt` → displays BOS, CHoCH, Grab info
* `fvg_txt` → “🟢 Open” or “🔴 Close”
* `ob_txt` → “🟩 Open” or “🟥 Close”
These feed a **visual dashboard** (not yet displayed in this excerpt), summarizing the entire market state in real time.
---
## 💡 8. Summary
The script:
* Observes **market structure (ICT)**.
* Automatically draws **institutional imbalance and interest zones** (OB, FVG).
* Dynamically manages their evolution.
* Provides **visual structural, volume, and sentiment signals**.
* Builds a **complete foundation for a professional ICT/SMC dashboard**.
Invite-only script
Only users approved by the author can access this script. You'll need to request and get permission to use it. This is typically granted after payment. For more details, follow the author's instructions below or contact KheopsCrypto directly.
TradingView does NOT recommend paying for or using a script unless you fully trust its author and understand how it works. You may also find free, open-source alternatives in our community scripts.
Author's instructions
Disclaimer
Invite-only script
Only users approved by the author can access this script. You'll need to request and get permission to use it. This is typically granted after payment. For more details, follow the author's instructions below or contact KheopsCrypto directly.
TradingView does NOT recommend paying for or using a script unless you fully trust its author and understand how it works. You may also find free, open-source alternatives in our community scripts.