MACD+MOMSQZ
Sep 13, 2019

The MACD+MOMSQZ indicator combines the classic Moving Average Convergence Divergence (MACD) with a Momentum Squeeze logic to provide a comprehensive view of trend direction, strength, and volatility compression.
Usage
The indicator can be used to identify potential trend reversals and breakout opportunities. Users can monitor the following components:
- MACD & Signal Line: Standard trend-following momentum. Bullish signals occur when the MACD line crosses above the Signal line, while bearish signals occur when it crosses below.
- Momentum Squeeze (Val): Displayed as a thick histogram, this calculates linear regression based on price relative to its range. Growing bright colors indicate increasing momentum, while faded colors suggest weakening momentum.
- Squeeze Crosses: These icons indicate volatility conditions. A white cross (Squeeze ON) suggests price is consolidating within Bollinger Bands that are inside Keltner Channels, often preceding a significant breakout. Faded crosses (Squeeze OFF) suggest the market is entering a trending phase.
- Background Highlighting: Changes color based on the relationship between the MACD and its signal line to provide immediate visual feedback on the current trend bias.
Details
The script executes two primary calculations:
- MACD Logic: It calculates the difference between a fast and slow moving average (EMA or SMA). A signal line is then derived from this difference.
- Squeeze Logic: It utilizes Bollinger Bands and Keltner Channels to detect periods of low volatility (Squeezes). The momentum component uses a linear regression of the price relative to an average of the high/low range and an SMA.
Settings
MACD Settings
- Fast Length: The period for the fast moving average.
- Slow Length: The period for the slow moving average.
- Source: The price source used for calculations (e.g., close).
- Signal Smoothing: The period for the signal line smoothing.
- Simple MA(Oscillator): Toggle between SMA and EMA for the MACD oscillator.
- Simple MA(Signal Line): Toggle between SMA and EMA for the signal line.
Squeeze Settings
- BB Length: The period for Bollinger Bands calculation.
- BB MultFactor: The standard deviation multiplier for Bollinger Bands.
- KC Length: The period for Keltner Channels.
- KC MultFactor: The multiplier for the Keltner Channel range.
- Use TrueRange (KC): If enabled, uses True Range for Keltner Channels; otherwise uses High-Low.
FAQ
How do I interpret the Squeeze crosses?
A white cross indicates a "Squeeze ON" state where volatility is low, often acting as a precursor to a volatile move. A faded cross indicates the squeeze has "fired," suggesting a potential breakout.
Can I change the moving average types?
Yes, the settings allow you to toggle between Simple Moving Averages (SMA) and Exponential Moving Averages (EMA) for both the MACD calculation and the signal line.
How do I access MACD+MOMSQZ?
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.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.