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.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。