OPEN-SOURCE SCRIPT
SMC BOS - Structure Breaks & Median Continuation Projections

This tool shows what usually happens after a Break of Structure (BOS).
It scans past BOS events on your chart, finds the ones most similar to the latest break (using ATR to filter by volatility), and then plots the median continuation path.
Optional percentile bands (P10–P90) display the possible range of outcomes around the median.
Key features:
• Automatic detection of bullish and bearish BOS events
• Library of past BOS with adjustable size and spacing
• ATR-based similarity and recency weighting
• Median continuation projections with optional percentile bands
• Customizable colors, signals, and stats table
• Works on any market and timeframe
Use cases:
• See how price typically behaves after a BOS
• Support SMC analysis with data-driven projections
• Improve trade planning by visualizing likely continuations
• Apply across crypto, forex, stocks, and futures
Originality:
Instead of only marking BOS, this script learns from history and projects forward the median path of the most similar past cases, adjusted for volatility. It turns BOS signals into practical continuation scenarios.
Instructions:
Add the indicator to your chart. When a BOS is detected, the projection is drawn automatically.
Use the settings to adjust the library, ATR weighting, projection style, percentile bands, and the display of signals or stats.
For questions or customization, contact Julien Eche (Julien_Eche) on TradingView.
It scans past BOS events on your chart, finds the ones most similar to the latest break (using ATR to filter by volatility), and then plots the median continuation path.
Optional percentile bands (P10–P90) display the possible range of outcomes around the median.
Key features:
• Automatic detection of bullish and bearish BOS events
• Library of past BOS with adjustable size and spacing
• ATR-based similarity and recency weighting
• Median continuation projections with optional percentile bands
• Customizable colors, signals, and stats table
• Works on any market and timeframe
Use cases:
• See how price typically behaves after a BOS
• Support SMC analysis with data-driven projections
• Improve trade planning by visualizing likely continuations
• Apply across crypto, forex, stocks, and futures
Originality:
Instead of only marking BOS, this script learns from history and projects forward the median path of the most similar past cases, adjusted for volatility. It turns BOS signals into practical continuation scenarios.
Instructions:
Add the indicator to your chart. When a BOS is detected, the projection is drawn automatically.
Use the settings to adjust the library, ATR weighting, projection style, percentile bands, and the display of signals or stats.
For questions or customization, contact Julien Eche (Julien_Eche) on TradingView.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
Plan the trade, trade the plan
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
Plan the trade, trade the plan
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.