INVITE-ONLY SCRIPT
Updated

BulletProof Order Blocks with Buy/Sell Signals (2027 Update)

37
BulletProof Order Blocks identifies swing-based pivot points and projects forward-looking order block zones using percentile-based statistics drawn from historical price and time deltas between reversals. Rather than relying on a fixed lookback, the indicator continuously builds a distribution of past bullish and bearish swings and uses that distribution to size each new zone — so projections adapt to the current instrument's volatility and rhythm instead of using one static box size for every market.

How It Works

  • Detects swing highs/lows using a configurable swing length
  • Tracks the price distance and bar distance of every bullish and bearish reversal (up to your configured maximum) in a rolling history
  • When a new pivot forms, calculates a percentile-based projection from that history to draw a forward-extending zone
  • Automatically colors zones bullish or bearish based on pivot direction
  • Optionally labels each new pivot with a Buy/Sell marker


Settings

  • Swing Length – controls how sensitive pivot detection is; shorter lengths catch more (smaller) swings, longer lengths filter for larger structural moves
  • Maximum Reversals – how many past pivots are kept in the statistical sample used for zone sizing
  • Normalize Data – switches the price-delta calculation to percentage terms, useful when comparing zone sizing across assets with very different price scales
  • Zone Percentile – sets how expansive projected zones are; lower values produce tighter zones, higher values produce wider ones
  • No Overlapping Zones – trims the previous zone when a new one forms so zones don't visually overlap
  • Show Only Last Zone – keeps only the most recent zone on the chart for a cleaner view
  • Show Buy/Sell Signals – toggles the pivot labels on or off
  • Bullish/Bearish Colors – customize zone fill colors


Alerts
Two alert conditions are built in:

  • Bullish Signal – fires when a new pivot forms with a bullish bias
  • Bearish Signal – fires when a new pivot forms with a bearish bias


Set these up via TradingView's Alert panel by selecting the indicator and choosing the desired condition.

A Note on Timeframes
This indicator is timeframe-agnostic and can be applied to any chart. Because the swing length is bar-based, the real-world time it represents scales with your chart — a 20-bar swing length spans roughly a couple of hours on a 5-minute chart versus several weeks on a daily chart. Traders generally adjust swing length and zone percentile to match their chart's noise level: shorter lengths and tighter percentiles for lower timeframes, longer lengths and wider percentiles for higher timeframes. As with any tool, results will vary by asset and market condition, and testing settings against your own chart and timeframe before live use is recommended.

Disclaimer
This indicator is provided for informational and educational purposes only and does not constitute financial advice. Trading involves substantial risk of loss and is not suitable for all investors. Past patterns identified by this or any indicator do not guarantee future results. Always conduct your own research and consult a licensed financial advisor before making trading decisions.
Release Notes
This update decouples Buy/Sell signal timing from order block zone calculation, letting you get into plays sooner without changing how zones are sized.

What's New

  • New "Signal Length (Early Entries)" input — a separate, faster swing length dedicated to Buy/Sell signals and alerts. Lower values confirm reversals sooner for earlier entries; the original "Swing Length" input continues to control order block zone sizing and statistics exactly as before.
  • Earlier Buy/Sell labels — signals now print as soon as the fast signal length confirms a reversal, independent of when a zone is drawn.
  • Alerts updated to match — both alert conditions now trigger on the same faster signal timing as the on-chart labels.


What Stayed the Same

  • Order block zone projection, percentile-based sizing, and all zone-related settings are untouched.
  • Set "Signal Length" equal to "Swing Length" to restore the original single-length signal behavior.


Note on Settings
A shorter signal length means earlier confirmation but also more sensitivity to noise — it's a genuine tradeoff, not a free upgrade. Test a few values against your specific asset and timeframe (defaults are a starting point, not a guarantee) before relying on it live.

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.