OPEN-SOURCE SCRIPT
Alea Magna Traders choch, bos

This script is a lightweight, custom-built Smart Money Concepts (SMC) Market Structure Indicator written in Pine Script v6 for TradingView.
It tracks real-time market structure shifts on your chart by identifying and plotting two core price action events: CHoCH (Change of Character) and BoS (Break of Structure).
Core Mechanics & Features
Dual-Timeframe/Sensitivity Structure Tracking:
Internal Structure (Micro): Tracks fast, short-term structural breaks using a smaller pivot sensitivity (default: 5). Ideal for finding lower-timeframe entries.
External Structure (Macro): Tracks major, high-timeframe structural pivots using a higher sensitivity (default: 25). Ideal for determining overall trend direction.
Market Structure Mapping:
CHoCH (Change of Character): Detects when price breaks the previous structure in the opposite direction of the current trend, signaling a potential trend reversal.
BoS (Break of Structure): Detects when price breaks structure in the same direction as the current trend, signaling trend continuation.
Clean Visual Overlay:
Draws horizontal dashed lines connecting the original pivot level to the breakout point.
Places color-coded labels (Bullish / Bearish) directly above or below the breakout candle.
Advanced Data Management:
Uses Pine Script v6 map.new() data structures to dynamically track swing high/low coordinates (upaxis, dnaxis, direction states) without lagging the chart.
Employs custom array slicing to calculate swing highs and lows independently.
Customizability & Filtering:
Allows traders to toggle Internal and External structures on or off independently.
Includes pattern filters to show All, BoS-only, or CHoCH-only markers.
Full control over Bullish and Bearish colors.
It tracks real-time market structure shifts on your chart by identifying and plotting two core price action events: CHoCH (Change of Character) and BoS (Break of Structure).
Core Mechanics & Features
Dual-Timeframe/Sensitivity Structure Tracking:
Internal Structure (Micro): Tracks fast, short-term structural breaks using a smaller pivot sensitivity (default: 5). Ideal for finding lower-timeframe entries.
External Structure (Macro): Tracks major, high-timeframe structural pivots using a higher sensitivity (default: 25). Ideal for determining overall trend direction.
Market Structure Mapping:
CHoCH (Change of Character): Detects when price breaks the previous structure in the opposite direction of the current trend, signaling a potential trend reversal.
BoS (Break of Structure): Detects when price breaks structure in the same direction as the current trend, signaling trend continuation.
Clean Visual Overlay:
Draws horizontal dashed lines connecting the original pivot level to the breakout point.
Places color-coded labels (Bullish / Bearish) directly above or below the breakout candle.
Advanced Data Management:
Uses Pine Script v6 map.new() data structures to dynamically track swing high/low coordinates (upaxis, dnaxis, direction states) without lagging the chart.
Employs custom array slicing to calculate swing highs and lows independently.
Customizability & Filtering:
Allows traders to toggle Internal and External structures on or off independently.
Includes pattern filters to show All, BoS-only, or CHoCH-only markers.
Full control over Bullish and Bearish colors.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.