OPEN-SOURCE SCRIPT
Updated Order Block Hunter

Order Block Hunter identifies a specific bullish reversal pattern from Smart Money Concepts (SMC): a down-closing week immediately followed by a breakout week whose range exceeds 1.5× the prior week's range and closes above that week's high.
Weekly timeframe only — the pattern was tested and validated exclusively on weekly bars; it will not fire on other timeframes.
Backtest methodology: tested on ~6,000 US-listed NYSE/NASDAQ tickers (~9,200 total signals), split into a development period (pre-2022) and a blind holdout period (2022+) never used to tune the rules. Compared against a buy-any-week baseline on the same universe. Confirmed not driven by a small handful of repeat tickers — per-ticker average win rate held up even when the 20 most frequent tickers were excluded.
What's shown on the chart:
Entry marker on the most recent signal only
The original "Order Block" zone (down week's range) as a shaded box
An invalidation level below the zone (tested to reduce false stop-outs vs. using the zone's exact low)
Two reference target levels based on historical median/mean forward returns
Optional EMA lines for visual trend context (not used as a filter — tested separately and found not to meaningfully affect outcomes)
Weekly timeframe only — the pattern was tested and validated exclusively on weekly bars; it will not fire on other timeframes.
Backtest methodology: tested on ~6,000 US-listed NYSE/NASDAQ tickers (~9,200 total signals), split into a development period (pre-2022) and a blind holdout period (2022+) never used to tune the rules. Compared against a buy-any-week baseline on the same universe. Confirmed not driven by a small handful of repeat tickers — per-ticker average win rate held up even when the 20 most frequent tickers were excluded.
What's shown on the chart:
Entry marker on the most recent signal only
The original "Order Block" zone (down week's range) as a shaded box
An invalidation level below the zone (tested to reduce false stop-outs vs. using the zone's exact low)
Two reference target levels based on historical median/mean forward returns
Optional EMA lines for visual trend context (not used as a filter — tested separately and found not to meaningfully affect outcomes)
Release Notes
Updated valuesRelease Notes
Updated chartOpen-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.