All indicators

Squeeze Momentum Alert Script

Nov 15, 2015

Static chart image
SignalsChannelsMoving AveragesVolatility

The Squeeze Momentum Alert Script tool identifies potential explosive market moves by detecting periods of low volatility (squeezes) and providing actionable entry and exit signals based on momentum direction.

Usage

The Squeeze Momentum Alert Script is primarily used to identify trend entries following a volatility contraction. Traders can use the histogram signals to manage positions as follows:

  • Long Entry (Green): Triggered when the market exits a squeeze with positive momentum.
  • Short Entry (Red): Triggered when the market exits a squeeze with negative momentum.
  • Close Long (Aqua/Blue): Triggered when bullish momentum begins to fade, suggesting an exit or profit-taking opportunity.
  • Close Short (Dull Blue/Orange): Triggered when bearish momentum begins to fade, suggesting an exit for short positions.

The indicator is optimized for automation, providing built-in alert conditions for each of these states to ensure traders are notified immediately upon bar close.

Details

This script is based on the classic "Squeeze" methodology which compares Bollinger Bands to Keltner Channels. When the Bollinger Bands trade inside the Keltner Channels, the market is said to be in a "Squeeze," representing a period of consolidation and low volatility. Once the Bollinger Bands expand outside the Keltner Channels, the squeeze "fires," and the script calculates the momentum using a linear regression of the price relative to the average of the historical high/low and moving average.

This specific version is refactored for performance and includes specific logic to trigger signals exactly when the squeeze releases, filtered by momentum direction and rate of change.

Settings

  • BB Length: The lookback period for the Bollinger Bands calculation.
  • BB MultFactor: The standard deviation multiplier for the Bollinger Bands width.
  • KC Length: The lookback period for the Keltner Channels calculation.
  • KC MultFactor: The multiplier applied to the range (ATR or High-Low) for the Keltner Channels.
  • Use TrueRange (KC): When enabled, the script uses True Range for Keltner Channel calculations; otherwise, it uses the standard High-Low range.

FAQ

How do I interpret the histogram signals? The histogram signals provide direct trade triggers: green and red bars represent entries, while the different shades of blue represent exit signals for longs and shorts respectively.

Can this script be used for automated trading? Yes, the script is designed with specific alert triggers for Long, Short, Close Long, and Close Short, making it compatible with webhook-based automation tools.

How can I access the Squeeze Momentum Alert Script? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.