OPEN-SOURCE SCRIPT
업데이트됨 Market Structure Break BOS Classifier

Market Structure Break — BOS Classifier
A clean, no-noise market structure indicator that goes beyond simply marking a BOS. Every break is classified by context so you immediately know whether to act on it or skip it.
🔵 What Makes This Different
Most BOS indicators fire the same label regardless of market context. This one answers the question that actually matters — was that break meaningful, or was it just noise inside a range?
Every Break of Structure is classified into one of three types:
📊 Signal Types
✔ Valid BOS (Green/Red — solid line)
Price closes above the previous swing high (bullish) or below the previous swing low (bearish) while outside a consolidation zone. This is a clean, high-confidence structural break. Fires on the exact candle of the break — no lag.
⚠ Range BOS (Yellow — dashed line)
Same close-cross condition, but price was inside a consolidation zone when it happened. These breaks are more likely to be fakeouts. Treat with caution — wait for a retest or additional confirmation before entry.
〰 iBOS — Internal BOS (Lime/Red — dashed line)
The short-term zigzag trend flips direction but the higher-level market structure has not changed. This is a minor internal move within the prevailing trend. Useful for spotting early reversals, but not a tradeable structure break on its own.
🟠 Consolidation / Range Detection
The indicator automatically detects when price is forming a lower high AND higher low relative to the prior swing — the classic compression signature. When active:
Background is highlighted in orange
A dashed boundary box shows the exact range with top and bottom levels
Any BOS fired during this phase is automatically tagged as a Range BOS
⚙️ How It Works Internally
Zigzag engine builds swing highs (h0, h1) and swing lows (l0, l1)
Valid/Range BOS → fires when close crosses h1 or l1 on the break candle (leading — no confirmation lag)
iBOS → fires when trend variable flips but market variable does not
Consolidation → h0 < h1 AND l0 > l1 simultaneously
🛠 Settings
SettingDescriptionZigZag LengthControls swing sensitivity. Higher = fewer, larger swingsFib FactorMinimum move required to confirm a structural break (0–1)Show Consolidation ZoneToggle the range box and background highlightShow Valid BOSToggle clean outside-range BOS signalsShow Range BOSToggle inside-range BOS signalsShow iBOSToggle internal minor structure flipsText SizeTiny / Small / Normal / Large / Huge
🔔 Alerts Available
✔ Valid BOS Bullish — clean break above swing high outside range
✔ Valid BOS Bearish — clean break below swing low outside range
⚠ Range BOS Bullish — break above swing high from inside consolidation
⚠ Range BOS Bearish — break below swing low from inside consolidation
iBOS Bullish — internal flip inside bearish structure
iBOS Bearish — internal flip inside bullish structure
Consolidation Start — market entered a range zone
📌 Recommended Usage
Use on your HTF bias timeframe (1H, 4H) to identify the market state
A Valid BOS in the direction of your bias = structure is with you
A Range BOS = wait for the retest of the broken level before committing
An iBOS inside a trending market = potential early entry signal in the direction of the trend, not against it
When the Consolidation zone is active, reduce position size or wait for a clean Valid BOS breakout before trading
⚠️ Disclaimer
This indicator is for educational and analytical purposes only. It does not constitute financial advice. Past performance of any signal is not indicative of future results. Always use proper risk management.
Based on original MSB-OB structure by © EmreKb. Extended with consolidation detection, BOS classification, and leading signal logic.
A clean, no-noise market structure indicator that goes beyond simply marking a BOS. Every break is classified by context so you immediately know whether to act on it or skip it.
🔵 What Makes This Different
Most BOS indicators fire the same label regardless of market context. This one answers the question that actually matters — was that break meaningful, or was it just noise inside a range?
Every Break of Structure is classified into one of three types:
📊 Signal Types
✔ Valid BOS (Green/Red — solid line)
Price closes above the previous swing high (bullish) or below the previous swing low (bearish) while outside a consolidation zone. This is a clean, high-confidence structural break. Fires on the exact candle of the break — no lag.
⚠ Range BOS (Yellow — dashed line)
Same close-cross condition, but price was inside a consolidation zone when it happened. These breaks are more likely to be fakeouts. Treat with caution — wait for a retest or additional confirmation before entry.
〰 iBOS — Internal BOS (Lime/Red — dashed line)
The short-term zigzag trend flips direction but the higher-level market structure has not changed. This is a minor internal move within the prevailing trend. Useful for spotting early reversals, but not a tradeable structure break on its own.
🟠 Consolidation / Range Detection
The indicator automatically detects when price is forming a lower high AND higher low relative to the prior swing — the classic compression signature. When active:
Background is highlighted in orange
A dashed boundary box shows the exact range with top and bottom levels
Any BOS fired during this phase is automatically tagged as a Range BOS
⚙️ How It Works Internally
Zigzag engine builds swing highs (h0, h1) and swing lows (l0, l1)
Valid/Range BOS → fires when close crosses h1 or l1 on the break candle (leading — no confirmation lag)
iBOS → fires when trend variable flips but market variable does not
Consolidation → h0 < h1 AND l0 > l1 simultaneously
🛠 Settings
SettingDescriptionZigZag LengthControls swing sensitivity. Higher = fewer, larger swingsFib FactorMinimum move required to confirm a structural break (0–1)Show Consolidation ZoneToggle the range box and background highlightShow Valid BOSToggle clean outside-range BOS signalsShow Range BOSToggle inside-range BOS signalsShow iBOSToggle internal minor structure flipsText SizeTiny / Small / Normal / Large / Huge
🔔 Alerts Available
✔ Valid BOS Bullish — clean break above swing high outside range
✔ Valid BOS Bearish — clean break below swing low outside range
⚠ Range BOS Bullish — break above swing high from inside consolidation
⚠ Range BOS Bearish — break below swing low from inside consolidation
iBOS Bullish — internal flip inside bearish structure
iBOS Bearish — internal flip inside bullish structure
Consolidation Start — market entered a range zone
📌 Recommended Usage
Use on your HTF bias timeframe (1H, 4H) to identify the market state
A Valid BOS in the direction of your bias = structure is with you
A Range BOS = wait for the retest of the broken level before committing
An iBOS inside a trending market = potential early entry signal in the direction of the trend, not against it
When the Consolidation zone is active, reduce position size or wait for a clean Valid BOS breakout before trading
⚠️ Disclaimer
This indicator is for educational and analytical purposes only. It does not constitute financial advice. Past performance of any signal is not indicative of future results. Always use proper risk management.
Based on original MSB-OB structure by © EmreKb. Extended with consolidation detection, BOS classification, and leading signal logic.
릴리즈 노트
# SB BOS + ZigZagSB BOS + ZigZag is a market structure indicator designed to identify significant Breaks of Structure (BOS) while filtering out much of the lower-timeframe noise that often creates false signals.
The indicator combines a ZigZag-based swing detection engine with protected swing logic to confirm genuine structural shifts in price action.
## How BOS Is Calculated
Bullish BOS:
- A new Lower Low (LL) forms.
- The most recent Lower High (LH) becomes the protected structure level.
- A Bullish BOS is confirmed when price closes above that protected LH.
Bearish BOS:
- A new Higher High (HH) forms.
- The most recent Higher Low (HL) becomes the protected structure level.
- A Bearish BOS is confirmed when price closes below that protected HL.
Only candle-close breaks are considered valid structure breaks.
## Features
- ZigZag swing visualization
- Bullish and Bearish BOS detection
- Close-based structure confirmation
- Customizable depth, deviation, and backstep settings
- Pair-specific presets for major Forex pairs
- Visual BOS levels and labels
- Alert conditions for bullish and bearish structure breaks
- Optional active settings panel
## Included Pair Presets
EUR/USD
- Depth: 106
- Deviation: 1.0
- Backstep: 2
GBP/USD
- Depth: 106
- Deviation: 1.5
- Backstep: 2
USD/JPY
- Depth: 120
- Deviation: 1.5
- Backstep: 2
EUR/JPY
- Depth: 120
- Deviation: 1.5
- Backstep: 2
## Intended Use
This indicator is designed primarily as a market structure confirmation tool rather than a standalone entry system. It is most effective when combined with liquidity analysis, higher-timeframe bias, premium/discount concepts, and additional trade confirmation methods.
The focus is on identifying meaningful structural shifts while reducing noise and over-signaling.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.