OPEN-SOURCE SCRIPT
BB + Keltner Squeeze (con SL)

BB + Keltner Squeeze with Dynamic SL
This indicator combines Bollinger Bands (2σ and optional 3σ) with Keltner Channels to detect phases of volatility compression (squeeze) and their release (expansion).
Squeeze ON (orange dot): Bollinger Bands are inside the Keltner Channel → low volatility / market compression.
Release (green triangle): Bollinger Bands break outside the Keltner Channel → volatility expansion.
Orange background: visually highlights squeeze phases.
Dynamic Stop Loss options:
KC Mode: stop at the opposite Keltner band (wider, good for trend following).
ATRlike Mode: stop based on a multiple of the range (tighter, good for scalping or short swings).
Intended use:
Identify moments when the market is “building energy” and trade breakouts after a release.
Adjust stop losses dynamically according to volatility.
Note: This is not a standalone trading system. It works best when combined with trend confirmation tools (EMA, MACD, market structure, etc.).
This indicator combines Bollinger Bands (2σ and optional 3σ) with Keltner Channels to detect phases of volatility compression (squeeze) and their release (expansion).
Squeeze ON (orange dot): Bollinger Bands are inside the Keltner Channel → low volatility / market compression.
Release (green triangle): Bollinger Bands break outside the Keltner Channel → volatility expansion.
Orange background: visually highlights squeeze phases.
Dynamic Stop Loss options:
KC Mode: stop at the opposite Keltner band (wider, good for trend following).
ATRlike Mode: stop based on a multiple of the range (tighter, good for scalping or short swings).
Intended use:
Identify moments when the market is “building energy” and trade breakouts after a release.
Adjust stop losses dynamically according to volatility.
Note: This is not a standalone trading system. It works best when combined with trend confirmation tools (EMA, MACD, market structure, etc.).
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.