PRO SMC Full Suite BY Mashrur

A Pine Script (v5) indicator for TradingView, focused on Smart Money Concepts (SMC). It overlays on price charts and provides visual tools for identifying key institutional trading behaviors.
🎯 Purpose
This script is designed to help traders analyze and trade using SMC principles by automatically detecting:
Order Blocks (OBs)
Fair Value Gaps (FVGs)
Breaks of Structure (BoS)
Liquidity Sweeps (Buy/Sell Side Liquidity Grabs)
Mitigation Entries
⚙️ Inputs / Settings
Show Fair Value Gaps: Toggle FVGs on/off
Higher Timeframe (HTF): Choose HTF for OB analysis
Use HTF OBs: Switch between current TF OBs and HTF OBs
Show Order Blocks: Toggle OBs on/off
Show OB Mitigation Entries: Toggle mitigation entry signals on/off
🧠 Core Logic Overview
🔹 1. Swing Points Detection
Identifies swing highs/lows using a 3-bar pattern (pivot-based structure).
🔹 2. Break of Structure (BoS)
A bullish BoS happens when price closes above the last swing high.
A bearish BoS occurs when price closes below the last swing low.
🔹 3. Order Block Detection
Upon BoS, the script marks the previous candle as the Order Block.
Uses either:
Current TF OBs (based on price action)
HTF OBs (based on candle body direction)
🔹 4. Mitigation Entry Logic
A mitigation occurs when price returns to the OB and reacts with confirmation:
Bullish: price dips into OB and closes above
Bearish: price wicks into OB and closes below
Plots entry markers for these mitigations.
🔹 5. Liquidity Sweeps
Detects equal highs/lows (liquidity zones)
Marks Buy SL when price dips below an equal low then closes above
Marks Sell SL when price breaks above an equal high then closes below
🔹 6. Fair Value Gaps (FVGs)
FVG Up: Gap between candle 3 and candle 1 (low[1] > high[2])
FVG Down: Gap between candle 3 and candle 1 (high[1] < low[2])
Plots highlighted boxes on these gaps
📊 Visual Elements
Boxes: For OB zones and FVGs
Shapes:
Labels: OB Buy/Sell entries
Triangles: Buy SL / Sell SL liquidity sweeps
Lines: Equal Highs and Lows
🔔 Alerts
Built-in alerts to notify when:
OB entries are confirmed
Liquidity sweeps happen
Helps in automation or active monitoring
✅ Ideal For
Traders using SMC, ICT concepts, Wyckoff, or institutional trading models
Anyone wanting to automate detection of structural elements on their chart
A Pine Script (v5) indicator for TradingView, focused on Smart Money Concepts (SMC). It overlays on price charts and provides visual tools for identifying key institutional trading behaviors.
🎯 Purpose
This script is designed to help traders analyze and trade using SMC principles by automatically detecting:
Order Blocks (OBs)
Fair Value Gaps (FVGs)
Breaks of Structure (BoS)
Liquidity Sweeps (Buy/Sell Side Liquidity Grabs)
Mitigation Entries
⚙️ Inputs / Settings
Show Fair Value Gaps: Toggle FVGs on/off
Higher Timeframe (HTF): Choose HTF for OB analysis
Use HTF OBs: Switch between current TF OBs and HTF OBs
Show Order Blocks: Toggle OBs on/off
Show OB Mitigation Entries: Toggle mitigation entry signals on/off
🧠 Core Logic Overview
🔹 1. Swing Points Detection
Identifies swing highs/lows using a 3-bar pattern (pivot-based structure).
🔹 2. Break of Structure (BoS)
A bullish BoS happens when price closes above the last swing high.
A bearish BoS occurs when price closes below the last swing low.
🔹 3. Order Block Detection
Upon BoS, the script marks the previous candle as the Order Block.
Uses either:
Current TF OBs (based on price action)
HTF OBs (based on candle body direction)
🔹 4. Mitigation Entry Logic
A mitigation occurs when price returns to the OB and reacts with confirmation:
Bullish: price dips into OB and closes above
Bearish: price wicks into OB and closes below
Plots entry markers for these mitigations.
🔹 5. Liquidity Sweeps
Detects equal highs/lows (liquidity zones)
Marks Buy SL when price dips below an equal low then closes above
Marks Sell SL when price breaks above an equal high then closes below
🔹 6. Fair Value Gaps (FVGs)
FVG Up: Gap between candle 3 and candle 1 (low[1] > high[2])
FVG Down: Gap between candle 3 and candle 1 (high[1] < low[2])
Plots highlighted boxes on these gaps
📊 Visual Elements
Boxes: For OB zones and FVGs
Shapes:
Labels: OB Buy/Sell entries
Triangles: Buy SL / Sell SL liquidity sweeps
Lines: Equal Highs and Lows
🔔 Alerts
Built-in alerts to notify when:
OB entries are confirmed
Liquidity sweeps happen
Helps in automation or active monitoring
✅ Ideal For
Traders using SMC, ICT concepts, Wyckoff, or institutional trading models
Anyone wanting to automate detection of structural elements on their chart
https://www.tradingview.com/x/vG42As3z/
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Untuk akses pantas pada carta, tambah skrip ini kepada kegemaran anda — ketahui lebih lanjut di sini.
Penafian
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Untuk akses pantas pada carta, tambah skrip ini kepada kegemaran anda — ketahui lebih lanjut di sini.