OPEN-SOURCE SCRIPT
Squeeze Momentum Indicator

This indicator identifies periods of low market volatility—commonly referred to as a "squeeze"—by comparing Bollinger Bands and Keltner Channels. When volatility compresses, price often prepares for a directional breakout. The histogram visualizes momentum strength and direction once the squeeze ends.
**How it works:**
- **Squeeze detection**: A squeeze is active when Bollinger Bands are fully contained within Keltner Channels. This appears as black crosses on the zero line.
- **Volatility expansion**: When Bollinger Bands move outside Keltner Channels, volatility is increasing. This state is marked with blue crosses.
- **Momentum histogram**: The core signal is a linear regression of price relative to a dynamic baseline (average of the highest high, lowest low, and SMA over the lookback period).
- **Aqua**: Positive momentum that is accelerating.
- **Bright blue**: Positive momentum that is decelerating.
- **Yellow**: Negative momentum that is accelerating downward.
- **Orange**: Negative momentum that is decelerating (potential reversal zone).
**Usage notes:**
Traders often monitor the transition from squeeze (black) to expansion (blue) combined with a strong histogram move away from zero as a potential entry signal. Color changes in the histogram help assess momentum shifts before price makes large moves.
This script is designed for educational and analytical purposes. It does not constitute investment advice. Always test strategies in a simulated environment before applying them to live trading.
**How it works:**
- **Squeeze detection**: A squeeze is active when Bollinger Bands are fully contained within Keltner Channels. This appears as black crosses on the zero line.
- **Volatility expansion**: When Bollinger Bands move outside Keltner Channels, volatility is increasing. This state is marked with blue crosses.
- **Momentum histogram**: The core signal is a linear regression of price relative to a dynamic baseline (average of the highest high, lowest low, and SMA over the lookback period).
- **Aqua**: Positive momentum that is accelerating.
- **Bright blue**: Positive momentum that is decelerating.
- **Yellow**: Negative momentum that is accelerating downward.
- **Orange**: Negative momentum that is decelerating (potential reversal zone).
**Usage notes:**
Traders often monitor the transition from squeeze (black) to expansion (blue) combined with a strong histogram move away from zero as a potential entry signal. Color changes in the histogram help assess momentum shifts before price makes large moves.
This script is designed for educational and analytical purposes. It does not constitute investment advice. Always test strategies in a simulated environment before applying them to live trading.
סקריפט קוד פתוח
ברוח TradingView אמיתית, היוצר של הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יכולים לבדוק ולאמת את הפונקציונליות שלו. כל הכבוד למחבר! למרות שאתה יכול להשתמש בו בחינם, זכור שפרסום מחדש של הקוד כפוף לכללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.
סקריפט קוד פתוח
ברוח TradingView אמיתית, היוצר של הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יכולים לבדוק ולאמת את הפונקציונליות שלו. כל הכבוד למחבר! למרות שאתה יכול להשתמש בו בחינם, זכור שפרסום מחדש של הקוד כפוף לכללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.