Squeeze Momentum Indicator [LazyBear]

Avatar
  • updated
  • Completed

Hi Andrew, 

Could this Squeeze Momentum indicator be implemented as an entry and exit signal?

LazyBear say:

This is a derivative of John Carter's "TTM Squeeze" volatility indicator, as discussed in his book "Mastering the Trade" (chapter 11).

Black crosses on the midline show that the market just entered a squeeze ( Bollinger Bands are with in Keltner Channel). This signifies low volatility , market preparing itself for an explosive move (up or down). Gray crosses signify "Squeeze release".


Mr.Carter suggests waiting till the first gray after a black cross, and taking a position in the direction of the momentum (for ex., if momentum value is above zero, go long). Exit the position when the momentum changes (increase or decrease --- signified by a color change). My (limited) experience with this shows, an additional indicator like ADX / WaveTrend, is needed to not miss good entry points. Also, Mr.Carter uses simple momentum indicator , while I have used a different method (linreg based) to plot the histogram.

Default Inputs:
bb_length=20

bb_std=2

kc_length=20

kc_scalar=1.5

mom_length=12

mom_smooth=12

tr=True

lazybear=True

BB = Bollinger Bands
KC = Keltner Channels
MOM = Momentum
SMA = Simple Moving Average
EMA = Exponential Moving Average
TR = True Range

RANGE = TR(high, low, close) if using_tr else high - low
BB_LOW, BB_MID, BB_HIGH = BB(close, bb_length, std=bb_std)
KC_LOW, KC_MID, KC_HIGH = KC(high, low, close, kc_length, kc_scalar, TR)

if lazybear:
       HH = high.rolling(kc_length).max()
       LL = low.rolling(kc_length).min()
       AVG = 0.25 * (HH + LL) + 0.5 * KC_MID
       SQZ = linreg(close - AVG, kc_length)
else:
       MOMO = MOM(close, mom_length)

if mamode == "ema":
      SQZ = EMA(MOMO, mom_smooth)
else:
      SQZ = EMA(momo, mom_smooth)

SQZ_ON = (BB_LOW > KC_LOW) and (BB_HIGH < KC_HIGH)
SQZ_OFF = (BB_LOW < KC_LOW) and (BB_HIGH > KC_HIGH)
NO_SQZ = !SQZ_ON and !SQZ_OFF

Image 2103

Image 2105

Image 2104

Used in conjunction with ADX

SIGNALS:
Combining the Squeeze Momentum Indicator and a common ADX , managed to efficiently link the weakness of the ADX with the beginning of a bullish or bearish momentum. The parameterization of its strategy was signaled in buy and sell alerts, which are represented as follows:
B (Buy): It is activated when a bearish movement marked by the ADX (Negative Slope) ends and the oscillator takes bullish directionality ( Bullish impulse).
S (Sell): It is activated when an upward movement marked by the ADX (Negative Slope) ends and the oscillator takes bearish directionality. ( Bearish momentum).

FILTER:
In order to prevent any trader from trading against the trend, a filter was added that limits the alerts for bearish entries when the trend is up and vice versa, that is, when the EMA 10 is above the EMA55, it is understood that the trend is bullish in that time frame, therefore the bearish entry alerts will not be activated. It will be the decision of each trader whether to activate or deactivate this function.

Sorry, I did not find an MQL library for this indicator, but you have the code in Python and in PineScript (TradingView) created by the author.

Python

https://github.com/twopirllc/pandas-ta/blob/main/pandas_ta/momentum/squeeze.py

Pine

https://www.tradingview.com/scripts/lazybear/

https://www.tradingview.com/script/nqQ1DT5a-Squeeze-Momentum-Indicator-LazyBear/

Image 2106

Squeeze + ADX

https://es.tradingview.com/v/PjaGa5pl/

Regards

How would you rate the customer service you received?

Satisfaction mark by Ulises Cune 8 months ago

Add a comment about quality of support you received (optional):

Avatar
4
Ulises Cune

I share the indicator that I found on a site.
Could be used in CP >= 2.49

Image 3789

SqueezeMomentumIndicator.mq5

Avatar
0
joel
Quote from Ulises Cune

I share the indicator that I found on a site.
Could be used in CP >= 2.49

Image 3789

SqueezeMomentumIndicator.mq5

How can I use material from Ulises Cune in CP?

Avatar
3
Andrey Khatimlianskyi
  • Completed

Thank you, Ulises, for all your contribution to the CP project!

Avatar
4
Ulises Cune

Thank you for creating this great EA for the entire community! Let's continue like this for many more years.