Squeeze Momentum Indicator [LazyBear]

‎385171‎ مشاهدة
385171 306

Fixed a typo in the code where BB multiplier was stuck at 1.5. Thanks @ucsgears for bringing it to my notice.

Updated source:

Use the updated source instead of the what TV shows below.

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.

More info:
- Book: Mastering The Trade by John F Carter
- Using Squeeze with ADX:

List of all my indicators:
إزالة من البرامج النصية المفضلة أضف إلى البرامج النصية المفضلة
// @author LazyBear 
// List of all my indicators:
study(shorttitle = "SQZMOM_LB", title="Squeeze Momentum Indicator [LazyBear]", overlay=false)

length = input(20, title="BB Length")
mult = input(2.0,title="BB MultFactor")
lengthKC=input(20, title="KC Length")
multKC = input(1.5, title="KC MultFactor")

useTrueRange = input(true, title="Use TrueRange (KC)", type=bool)

// Calculate BB
source = close
basis = sma(source, length)
dev = multKC * stdev(source, length)
upperBB = basis + dev
lowerBB = basis - dev

// Calculate KC
ma = sma(source, lengthKC)
range = useTrueRange ? tr : (high - low)
rangema = sma(range, lengthKC)
upperKC = ma + rangema * multKC
lowerKC = ma - rangema * multKC

sqzOn  = (lowerBB > lowerKC) and (upperBB < upperKC)
sqzOff = (lowerBB < lowerKC) and (upperBB > upperKC)
noSqz  = (sqzOn == false) and (sqzOff == false)

val = linreg(source  -  avg(avg(highest(high, lengthKC), lowest(low, lengthKC)),sma(close,lengthKC)), 

bcolor = iff( val > 0, 
            iff( val > nz(val[1]), lime, green),
            iff( val < nz(val[1]), red, maroon))
scolor = noSqz ? blue : sqzOn ? black : gray 
plot(val, color=bcolor, style=histogram, linewidth=4)
plot(0, color=scolor, style=cross, linewidth=2)
List of my free indicators:
List of my indicators at Appstore:
Does anyone know how to fire an alarm on closed black cross? Is that possible with this indicator?
Hello Guys firstly i want to thank LazyBear for his Momentum Algo , and i want to notify people here that i ported his code to work the Btc Dominance and Altcoins Dominance to show you how much domination that has happened , and that will help everyone here to trade better with a timed strategy . BTC- TREND : /////////////////////////// Alts-Trend : /////// Hope it will help you in your trading way :) .
been learning pine and really appreciate your scripts. super helpful in my journey so far.

Processing script...
line 12: 'bool' could not be a variable or function name
Script 'My Script' has been saved
Add to Chart operation failed, reason: line 12: 'bool' could not be a variable or function name

+3 رد
03.freeman marco02020202
@marco02020202, here is a MTF verison with this error fixed:
How to add ADX in this script?
+5 رد
Nice indicator, Looks like it is used very well on the daily time frame. Thanks !
+7 رد
MarxBabu Trade4life87
@Trade4life87, best of the best.
الصفحة الرئيسية منصة الأسهم منصًة العملات منصّة العملات الرقمية جدول الأعمال الاقتصادي برامج تعليمية كيف نعمل مميزات الرسم البياني أسعار العضوية قوانين الموقع أبطال لغة Pine المشرفون حلول المواقع الإلكترونية والوسطاء الأدوات حلول الرسوم البيانية مكتبة الرسوم البيانية صغيرة الحجم مركز المساعدة إحالة صديق طلب الخصائص المدوّنة والأخبار تويتر
ملف التعريف إعدادات الصفحة الشخصية الحساب وإعداد الفواتير إحالة صديق تذاكر الدعم الخاصة بي مركز المساعدة التحاليل المنشورة المتابعين تتابع رسالة خاصة المحادثة تسجيل الخروج