PROTECTED SOURCE SCRIPT
Simplified SMC Order Blocks

📌 Simplified SMC Order Blocks (Pine Script v6)
This script automatically identifies bullish and bearish order blocks based on simple swing highs and lows — inspired by Smart Money Concepts (SMC) and price action trading.
🔍 Features
Detects swing highs/lows using a lookback period
Waits for confirmation candles to validate the zone
Draws order block zones using box.new() directly on the chart
Includes alerts for both bullish and bearish order blocks
⚙️ Inputs
Lookback: How many candles to look back for swing points
Confirmation Candles: How many bars to wait before confirming the OB
Zone Width: Width of the drawn zone (in bars)
🟩 Bullish Order Block:
Identified after a swing low forms
Plots a green shaded zone below price
🟥 Bearish Order Block:
Identified after a swing high forms
Plots a red shaded zone above price
📈 Use Case
Identify potential reversal or mitigation zones
Align with other SMC tools like break of structure (BoS), liquidity sweep, etc.
This script automatically identifies bullish and bearish order blocks based on simple swing highs and lows — inspired by Smart Money Concepts (SMC) and price action trading.
🔍 Features
Detects swing highs/lows using a lookback period
Waits for confirmation candles to validate the zone
Draws order block zones using box.new() directly on the chart
Includes alerts for both bullish and bearish order blocks
⚙️ Inputs
Lookback: How many candles to look back for swing points
Confirmation Candles: How many bars to wait before confirming the OB
Zone Width: Width of the drawn zone (in bars)
🟩 Bullish Order Block:
Identified after a swing low forms
Plots a green shaded zone below price
🟥 Bearish Order Block:
Identified after a swing high forms
Plots a red shaded zone above price
📈 Use Case
Identify potential reversal or mitigation zones
Align with other SMC tools like break of structure (BoS), liquidity sweep, etc.
Script protetto
Questo script è pubblicato come codice protetto. Tuttavia, è possibile utilizzarlo liberamente e senza alcuna limitazione – per saperne di più clicca qui.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script protetto
Questo script è pubblicato come codice protetto. Tuttavia, è possibile utilizzarlo liberamente e senza alcuna limitazione – per saperne di più clicca qui.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.