OPEN-SOURCE SCRIPT

Volatility Regime Breakout [Squeeze + ATR + Trend + PreAlert]

454
Volatility Regime Breakout [Squeeze + ATR + Trend]

A hybrid indicator combining three layers of confirmation to detect the birth of high-volatility regimes and filter out low-quality entries in sideways markets.

How it works:
🔹 Squeeze (BB vs KC): detects when Bollinger Bands compress inside Keltner Channels — a low-volatility phase that historically precedes strong directional moves.

🔹 Pre-Alert: before the release, the indicator measures whether the compression is accelerating (band-width contraction) to give you early warning (purple background + ⚠ icon) that an entry may be developing — this is not an entry signal, it's an early heads-up.

🔹 Expansion confirmation (ATR Ratio): on squeeze release, the script requires the ATR to be genuinely expanding relative to its baseline, filtering out false breakouts with no real range/momentum behind them.

🔹 Trend direction (EMA + slope): only generates a buy/sell signal when the breakout aligns with the underlying trend direction, avoiding counter-trend entries on the first impulse.

Includes:

Three distinct background states: normal squeeze, pre-alert, confirmed breakout
BUY/SELL signals on bar close only (no repainting)
Suggested Stop Loss / Take Profit levels based on ATR (visual reference only, not automatic execution)
Independent, configurable alerts for pre-alert and confirmed entry, with custom messages
All sensitivity parameters are adjustable from the settings panel

Recommended for: BTC and high-volatility crypto assets, 1h timeframe and above to reduce noise.

⚠️ This script is a technical analysis tool, not an automated trading system or financial advice. SL/TP levels are for reference only. We recommend validating the logic through your own backtesting before using it on a live account, and always applying proper risk management.

כתב ויתור

המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.