OPEN-SOURCE SCRIPT
Market Structure (ChoCh & BOS) [identityKa]

Overview
The Market Structure (CHoCH & BOS) [identityKa] is a premium Smart Money Concepts (SMC) indicator designed to automatically track institutional market flow. Unlike basic structural indicators that only draw horizontal lines, this advanced engine identifies the precise moment the market bias shifts (CHoCH) or continues (BOS), and instantly plots the originating Order Block (OB) from which the structural break was initiated.
Core Mechanics & Terminology
The algorithm maps the market using strict pivot logic (customizable sensitivity) to filter out market noise and focus on true liquidity sweeps:
Change of Character (CHoCH): The first definitive sign of a trend reversal. Triggered when the price strictly closes above the last structural lower-high (in a downtrend) or below the last structural higher-low (in an uptrend).
Break of Structure (BOS): A continuation signal. Triggered when the price strictly closes above the last higher-high (in an uptrend) or below the last lower-low (in a downtrend), validating that the current trend remains dominant.
Auto Order Blocks (OB): This is the premium feature of the script. Whenever a valid BOS or CHoCH occurs, the engine mathematically traces back to the extreme pivot candle that caused the break. It automatically draws a highlighted Order Block zone (from the high to the low of that specific candle), projecting it forward as a highly probable area of future institutional mitigation.
HUD Dashboard & AI Logic
To streamline SMC trading, the integrated on-chart panel evaluates the active market structure and outputs a mechanical state:
Dangerous: Displayed whenever the current live price action enters an active, unmitigated Order Block (OB) zone. This acts as a critical warning that price is in a high-friction institutional area, and a violent rejection or bounce is imminent. Standard continuation trades should be avoided here.
LONG: Triggered when the macro bias is Bullish (last break was a Bullish CHoCH or BOS) and the price is comfortably outside of any active Order Block zones.
SHORT: Triggered when the macro bias is Bearish and the price is cleanly trending outside of active resistance zones.
How to Use It for Maximum Precision
SMC traders rely on patience and mitigation. When the indicator prints a new CHoCH or BOS, do not enter immediately. Instead, wait for the AI Suggestion to switch to "Dangerous" as the price pulls back into the newly formed Order Block. Once inside the box, drop to a lower timeframe to look for a micro-CHoCH confirmation, and execute your trade in the direction of the macro bias (LONG or SHORT) for explosive risk-to-reward ratios.
The Market Structure (CHoCH & BOS) [identityKa] is a premium Smart Money Concepts (SMC) indicator designed to automatically track institutional market flow. Unlike basic structural indicators that only draw horizontal lines, this advanced engine identifies the precise moment the market bias shifts (CHoCH) or continues (BOS), and instantly plots the originating Order Block (OB) from which the structural break was initiated.
Core Mechanics & Terminology
The algorithm maps the market using strict pivot logic (customizable sensitivity) to filter out market noise and focus on true liquidity sweeps:
Change of Character (CHoCH): The first definitive sign of a trend reversal. Triggered when the price strictly closes above the last structural lower-high (in a downtrend) or below the last structural higher-low (in an uptrend).
Break of Structure (BOS): A continuation signal. Triggered when the price strictly closes above the last higher-high (in an uptrend) or below the last lower-low (in a downtrend), validating that the current trend remains dominant.
Auto Order Blocks (OB): This is the premium feature of the script. Whenever a valid BOS or CHoCH occurs, the engine mathematically traces back to the extreme pivot candle that caused the break. It automatically draws a highlighted Order Block zone (from the high to the low of that specific candle), projecting it forward as a highly probable area of future institutional mitigation.
HUD Dashboard & AI Logic
To streamline SMC trading, the integrated on-chart panel evaluates the active market structure and outputs a mechanical state:
Dangerous: Displayed whenever the current live price action enters an active, unmitigated Order Block (OB) zone. This acts as a critical warning that price is in a high-friction institutional area, and a violent rejection or bounce is imminent. Standard continuation trades should be avoided here.
LONG: Triggered when the macro bias is Bullish (last break was a Bullish CHoCH or BOS) and the price is comfortably outside of any active Order Block zones.
SHORT: Triggered when the macro bias is Bearish and the price is cleanly trending outside of active resistance zones.
How to Use It for Maximum Precision
SMC traders rely on patience and mitigation. When the indicator prints a new CHoCH or BOS, do not enter immediately. Instead, wait for the AI Suggestion to switch to "Dangerous" as the price pulls back into the newly formed Order Block. Once inside the box, drop to a lower timeframe to look for a micro-CHoCH confirmation, and execute your trade in the direction of the macro bias (LONG or SHORT) for explosive risk-to-reward ratios.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.