OPEN-SOURCE SCRIPT
SMC Structure Identifier

This indicator uses SMC (ICT) concept for market structure identification.
It maps market structure using confirmed swing highs and swing lows, then builds structural logic from those points. It is designed to separate raw swings from meaningful structural swings, label the structure, and optionally display Break of Structure (BOS) events.
The swing logic uses a configurable lookback and forward confirmation window. Once raw swings are detected, consecutive highs or lows are compared so that only the most structurally relevant point is kept. Overwritten swings can optionally be shown separately, making it easier to understand how structure is being filtered.
Features:
• Confirmed swing high and swing low detection
• Structural swing filtering with overwritten swing handling
• Optional HH, LH, HL, and LL labels
• Optional bullish and bearish BOS detection
• BOS based on protected highs/lows and candle close
• Customizable swing marker size and colors
• Customizable BOS colors, line width, and label placement
• Ability to show or hide ignored/overwritten swings
Logic:
A structural swing is confirmed when an opposite swing appears. If multiple swings of the same type occur before an opposite swing confirms structure, only the most extreme swing is kept:
• Higher highs replace prior unconfirmed highs
• Lower lows replace prior unconfirmed lows
Trend and BOS logic are based on protected highs and lows:
• In a bearish trend, a close above the protected high marks a bullish BOS
• In a bullish trend, a close below the protected low marks a bearish BOS
This tool is intended for traders who use SMC for market structure, swing analysis, and break-of-structure concepts in their discretionary analysis.
Note:
1. Market Structure inside SMC is subjective; this indicator is an attempt to implement it into the code. Regulate Lookforward and Lookback variables to find the most suitable structure for you.
2. This indicator does not provide buy or sell signals. It is a visual structure-mapping tool and should be used together with your own trading plan, risk management, and additional analysis.
It maps market structure using confirmed swing highs and swing lows, then builds structural logic from those points. It is designed to separate raw swings from meaningful structural swings, label the structure, and optionally display Break of Structure (BOS) events.
The swing logic uses a configurable lookback and forward confirmation window. Once raw swings are detected, consecutive highs or lows are compared so that only the most structurally relevant point is kept. Overwritten swings can optionally be shown separately, making it easier to understand how structure is being filtered.
Features:
• Confirmed swing high and swing low detection
• Structural swing filtering with overwritten swing handling
• Optional HH, LH, HL, and LL labels
• Optional bullish and bearish BOS detection
• BOS based on protected highs/lows and candle close
• Customizable swing marker size and colors
• Customizable BOS colors, line width, and label placement
• Ability to show or hide ignored/overwritten swings
Logic:
A structural swing is confirmed when an opposite swing appears. If multiple swings of the same type occur before an opposite swing confirms structure, only the most extreme swing is kept:
• Higher highs replace prior unconfirmed highs
• Lower lows replace prior unconfirmed lows
Trend and BOS logic are based on protected highs and lows:
• In a bearish trend, a close above the protected high marks a bullish BOS
• In a bullish trend, a close below the protected low marks a bearish BOS
This tool is intended for traders who use SMC for market structure, swing analysis, and break-of-structure concepts in their discretionary analysis.
Note:
1. Market Structure inside SMC is subjective; this indicator is an attempt to implement it into the code. Regulate Lookforward and Lookback variables to find the most suitable structure for you.
2. This indicator does not provide buy or sell signals. It is a visual structure-mapping tool and should be used together with your own trading plan, risk management, and additional analysis.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.