OPEN-SOURCE SCRIPT
Volatility Regime Breakout [Squeeze + ATR + Trend + PreAlert]

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.
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.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.