OPEN-SOURCE SCRIPT
1.1 SMF LONG: Sweep → BOS → OB → BOS break

SMF LONG Strategy (Sweep → BOS → Order Block → BOS) — Summary
The strategy looks for a moment when the market takes liquidity to the downside through a sweep (breaking previous lows), followed by the formation of the first BOS, indicating that sellers have lost control. After that, the strategy waits for the creation of an Order Block (OB) — the last bearish candle before the upward impulse — which highlights the zone where large players entered positions. When price returns to the OB, the entry (TVH) is placed at the top of the OB, the stop-loss at the bottom of the OB, and the take-profit is always set to 3× the stop size, regardless of the OB width.
In a one-year backtest from December 2024 to December 2025, the strategy and indicator showed a win rate of 30.85%:
65 stop-losses,
29 take-profits,
and 15 missed trades where the take-profit was hit before price could return to the entry zone.
The strategy looks for a moment when the market takes liquidity to the downside through a sweep (breaking previous lows), followed by the formation of the first BOS, indicating that sellers have lost control. After that, the strategy waits for the creation of an Order Block (OB) — the last bearish candle before the upward impulse — which highlights the zone where large players entered positions. When price returns to the OB, the entry (TVH) is placed at the top of the OB, the stop-loss at the bottom of the OB, and the take-profit is always set to 3× the stop size, regardless of the OB width.
In a one-year backtest from December 2024 to December 2025, the strategy and indicator showed a win rate of 30.85%:
65 stop-losses,
29 take-profits,
and 15 missed trades where the take-profit was hit before price could return to the entry zone.
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.