OPEN-SOURCE SCRIPT
Market Structure (BOS on Break, HH/HL/LH/LL)

Market Structure (BOS on Break, HH/HL/LH/LL) is a clean and reactive market structure tool designed for traders who want clear visual feedback of trend direction and structure changes.
It automatically identifies:
Higher Highs (HH)
Higher Lows (HL)
Lower Highs (LH)
Lower Lows (LL)
Breaks of Structure (BOS) when price breaches previous swing levels.
✳️ Features
Automatic Structure Detection: Detects swing highs/lows based on your left/right pivot settings.
Break of Structure Alerts: Instantly updates bias when price breaks a previous swing level (no delay).
Real-Time BOS Response: Structure flips as soon as price takes out the previous high or low.
Color-Coded Bars: Bars can auto-paint white for bullish and black for bearish conditions.
Optional Fading Dots: Visual fading dots track trend duration and strength for quick bias reading.
Customizable Pivots: Choose how many bars to use for left/right swing confirmation.
Alerts: Fully configured for HH, HL, LH, LL, BOS Up, and BOS Down events.
⚙️ Inputs
Left Pivot Bars / Right Pivot Bars: Control how many candles define a valid swing point.
Paint Bars by Trend: Toggle bar coloring to match bullish or bearish bias.
Show Fading Trend Dots: Add fading dots that shrink and fade as a trend matures.
🔔 Alerts
Break of Structure Up / Down
Higher High (HH) confirmed
Higher Low (HL) confirmed
Lower High (LH) confirmed
Lower Low (LL) confirmed
🎯 Use Case
Perfect for:
Price action traders
Smart money concept (SMC) practitioners
Trend structure analysts
Scalpers and swing traders looking for quick structure flips.
🧠 Notes
Works on any timeframe and any instrument.
BOS signals update immediately when price breaks structure (no lag).
For additional BOS markers, you can uncomment the last few lines in the script to show arrows when structure breaks.
It automatically identifies:
Higher Highs (HH)
Higher Lows (HL)
Lower Highs (LH)
Lower Lows (LL)
Breaks of Structure (BOS) when price breaches previous swing levels.
✳️ Features
Automatic Structure Detection: Detects swing highs/lows based on your left/right pivot settings.
Break of Structure Alerts: Instantly updates bias when price breaks a previous swing level (no delay).
Real-Time BOS Response: Structure flips as soon as price takes out the previous high or low.
Color-Coded Bars: Bars can auto-paint white for bullish and black for bearish conditions.
Optional Fading Dots: Visual fading dots track trend duration and strength for quick bias reading.
Customizable Pivots: Choose how many bars to use for left/right swing confirmation.
Alerts: Fully configured for HH, HL, LH, LL, BOS Up, and BOS Down events.
⚙️ Inputs
Left Pivot Bars / Right Pivot Bars: Control how many candles define a valid swing point.
Paint Bars by Trend: Toggle bar coloring to match bullish or bearish bias.
Show Fading Trend Dots: Add fading dots that shrink and fade as a trend matures.
🔔 Alerts
Break of Structure Up / Down
Higher High (HH) confirmed
Higher Low (HL) confirmed
Lower High (LH) confirmed
Lower Low (LL) confirmed
🎯 Use Case
Perfect for:
Price action traders
Smart money concept (SMC) practitioners
Trend structure analysts
Scalpers and swing traders looking for quick structure flips.
🧠 Notes
Works on any timeframe and any instrument.
BOS signals update immediately when price breaks structure (no lag).
For additional BOS markers, you can uncomment the last few lines in the script to show arrows when structure breaks.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.