OPEN-SOURCE SCRIPT
Aktualisiert 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.
Versionshinweise
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.
Versionshinweise
Updated:- Improved MTF label alignment
- Minor dashboard refinement
- Performance optimizations
Versionshinweise
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.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Percorso completo: Wyckoff – Smart Money – ICT
capitan-trading.com/
capitan-trading.com/
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Percorso completo: Wyckoff – Smart Money – ICT
capitan-trading.com/
capitan-trading.com/
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.