OPEN-SOURCE SCRIPT
已更新 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.
發行說明
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.
發行說明
Updated:- Improved MTF label alignment
- Minor dashboard refinement
- Performance optimizations
發行說明
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.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
Percorso completo: Wyckoff – Smart Money – ICT
capitan-trading.com/
capitan-trading.com/
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
Percorso completo: Wyckoff – Smart Money – ICT
capitan-trading.com/
capitan-trading.com/
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。