OPEN-SOURCE SCRIPT
Diupdate SMC Market Structure & MTF Levels by Capitan-Trading

Overview
The SMC Market Structure & MTF Levels is a comprehensive yet lightweight tool designed to help day traders and swing traders visualize market structure shifts, key multi-timeframe (MTF) levels, and custom trading sessions without cluttering the chart.
Underlying Logic & Features
This script is built around three core analytical modules:
1. Algorithmic Market Structure (CHoCH / BOS):
The indicator tracks market structure using a standard Pivot High / Pivot Low calculation (ta.pivothigh / ta.pivotlow). Users can define the sensitivity by adjusting the left and right lookback bars. When the price strictly closes (if 'Confirmed Only' is enabled) above the last detected pivot high, the script dynamically identifies a bullish shift (CHoCH/BOS). Conversely, a close below the last pivot low flags a bearish structural break.
2. Multi-Timeframe Levels with Staggered Visuals:
The script fetches the Previous Daily (PDH/PDL), Weekly (PWH/PWL), and Monthly (PMH/PML) highs and lows using secure request.security calls to prevent any lookahead bias. A common issue with MTF levels is overlapping labels when a Daily high coincides with a Weekly high. To solve this, the script applies a dynamic horizontal offset engine: Daily, Weekly, and Monthly lines project at different lengths into the future (e.g., +20, +28, +36 bars), ensuring all labels are perfectly readable side-by-side.
3. Session Boxes & Real-Time Dashboard:
Users can highlight up to three custom time sessions (e.g., Asian range, London Open, NY Open) with adjustable background boxes. Additionally, a minimalist, non-intrusive dashboard displays the current structural bias (Bull/Bear) and calculates the real-time percentage distance between the current price and the major MTF levels, giving traders an immediate gauge of liquidity proximity.
Usage:
Apply this tool to any timeframe to maintain a clear top-down perspective of structural shifts and major liquidity magnets.
The SMC Market Structure & MTF Levels is a comprehensive yet lightweight tool designed to help day traders and swing traders visualize market structure shifts, key multi-timeframe (MTF) levels, and custom trading sessions without cluttering the chart.
Underlying Logic & Features
This script is built around three core analytical modules:
1. Algorithmic Market Structure (CHoCH / BOS):
The indicator tracks market structure using a standard Pivot High / Pivot Low calculation (ta.pivothigh / ta.pivotlow). Users can define the sensitivity by adjusting the left and right lookback bars. When the price strictly closes (if 'Confirmed Only' is enabled) above the last detected pivot high, the script dynamically identifies a bullish shift (CHoCH/BOS). Conversely, a close below the last pivot low flags a bearish structural break.
2. Multi-Timeframe Levels with Staggered Visuals:
The script fetches the Previous Daily (PDH/PDL), Weekly (PWH/PWL), and Monthly (PMH/PML) highs and lows using secure request.security calls to prevent any lookahead bias. A common issue with MTF levels is overlapping labels when a Daily high coincides with a Weekly high. To solve this, the script applies a dynamic horizontal offset engine: Daily, Weekly, and Monthly lines project at different lengths into the future (e.g., +20, +28, +36 bars), ensuring all labels are perfectly readable side-by-side.
3. Session Boxes & Real-Time Dashboard:
Users can highlight up to three custom time sessions (e.g., Asian range, London Open, NY Open) with adjustable background boxes. Additionally, a minimalist, non-intrusive dashboard displays the current structural bias (Bull/Bear) and calculates the real-time percentage distance between the current price and the major MTF levels, giving traders an immediate gauge of liquidity proximity.
Usage:
Apply this tool to any timeframe to maintain a clear top-down perspective of structural shifts and major liquidity magnets.
Catatan Rilis
OverviewThe SMC Market Structure & MTF Levels is a comprehensive yet lightweight tool designed to help day traders and swing traders visualize market structure shifts, key multi-timeframe (MTF) levels, and custom trading sessions without cluttering the chart.
Underlying Logic & Features
This script is built around three core analytical modules:
1. Algorithmic Market Structure (CHoCH / BOS):
The indicator tracks market structure using a standard Pivot High / Pivot Low calculation (ta.pivothigh / ta.pivotlow). Users can define the sensitivity by adjusting the left and right lookback bars. When the price strictly closes (if 'Confirmed Only' is enabled) above the last detected pivot high, the script dynamically identifies a bullish shift (CHoCH/BOS). Conversely, a close below the last pivot low flags a bearish structural break.
2. Multi-Timeframe Levels with Staggered Visuals:
The script fetches the Previous Daily (PDH/PDL), Weekly (PWH/PWL), and Monthly (PMH/PML) highs and lows using secure request.security calls to prevent any lookahead bias. A common issue with MTF levels is overlapping labels when a Daily high coincides with a Weekly high. To solve this, the script applies a dynamic horizontal offset engine: Daily, Weekly, and Monthly lines project at different lengths into the future (e.g., +20, +28, +36 bars), ensuring all labels are perfectly readable side-by-side.
3. Session Boxes & Real-Time Dashboard:
Users can highlight up to three custom time sessions (e.g., Asian range, London Open, NY Open) with adjustable background boxes. Additionally, a minimalist, non-intrusive dashboard displays the current structural bias (Bull/Bear) and calculates the real-time percentage distance between the current price and the major MTF levels, giving traders an immediate gauge of liquidity proximity.
Usage:
Apply this tool to any timeframe to maintain a clear top-down perspective of structural shifts and major liquidity magnets.
Catatan Rilis
Updated:- Improved MTF label alignment
- Minor dashboard refinement
- Performance optimizations
Catatan Rilis
Update Notes:Upgraded the SMC engine (CHoCH/BOS) with strict institutional logic to completely prevent repainting and false signals.
Restored and deeply optimized the Liquidity Engine (Pivot tracking, Sweeps, and Mitigation) for better performance.
Fixed minor Pine Script v6 compatibility issues to ensure maximum stability across all timeframes.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Percorso completo: Wyckoff – Smart Money – ICT
capitan-trading.com/
capitan-trading.com/
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Percorso completo: Wyckoff – Smart Money – ICT
capitan-trading.com/
capitan-trading.com/
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.