OPEN-SOURCE SCRIPT
RigTrades Break of Structure (BOS)

Trend Tracking — compares each new swing high/low to the previous one. Higher highs + higher lows = uptrend. Lower highs + lower lows = downtrend.
BOS Signals:
🟢 Green arrow (below candle) — price closes above the last swing high while in a downtrend → bullish break of structure
🔴 Red arrow (above candle) — price closes below the last swing low while in an uptrend → bearish break of structure
BOS Signals:
🟢 Green arrow (below candle) — price closes above the last swing high while in a downtrend → bullish break of structure
🔴 Red arrow (above candle) — price closes below the last swing low while in an uptrend → bearish break of structure
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.