OPEN-SOURCE SCRIPT

SMC Structure Identifier

487
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.

Penafian

Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.