Beardy Squeeze Chart Setup For ThinkOrSwim

dart966

New member
VIP
Here's my setup with the Beardy Squeeze Pro, MTF Squeeze Labels, MTF Squeeze Histogram Labels, The Confirmation Trend Chart, and Volume Buy Sell Pressure with Hot Percent.

I modified the Beardy Squeeze Pro, MTF Squeeze Labels, and MTF Squeeze Histogram Labels so the colors will be aligned.

"NO SQUEEZE" = GREEN
"LOW COMPRESSION" (Pre-Squeeze) = GRAY
"MID COMPRESSION" (Squeeze) = RED
"HIGH COMPRESSION" (Extreme Squeeze) = ORANGE

Many thanks to:
samer800 (Beardy Squeeze Pro)
caseyjbrett (MTF Squeeze Labels and MTF Squeeze Histogram Labels)
Christopher84 & HODL-Lay-HE-hoo! (The Confirmation Trend Chart)
horserider (Volume Buy Sell Pressure with Hot Percent)

Shared chart link:
http://tos.mx/zW5xnwL

Squeeze.png
 
Last edited:
I added the "Beardy Squeeze Pro" squeeze dots to the IronRod SMI (replaces the "r-Square Centerline Indicator").

Thanks to:
tomsk (IronRod SMI indicator)
samer800 (Beardy Squeeze Pro)
u4WRz0d.png

http://tos.mx/nWbTwZP
Ruby:
#// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
#// © Beardy_Fred
#indicator('Beardy Squeeze Pro', shorttitle='Squeeze', overlay=false, precision=2)
# Converted by Sam4Cok@Samer800        - 05/2023
declare lower;
input ShowLabel = yes;        # "Alert Price Action Squeeze"
input MovAvgType   = AverageType.SIMPLE;
input length       = 20;      # "TTM Squeeze Length"
input BB_mult      = 2.0;     # "Bollinger Band STD Multiplier"
input KC_mult_high = 1.0;     # "Keltner Channel #1"
input KC_mult_mid  = 1.5;     # "Keltner Channel #2"
input KC_mult_low  = 2.0;     # "Keltner Channel #3"

def na = Double.NaN;
def last = isNaN(close);

#--- Color
DefineGlobalColor("up1", CreateColor(0,188,212));
DefineGlobalColor("up2", CreateColor(41,98,255));
DefineGlobalColor("dn1", CreateColor(255,82,82));
DefineGlobalColor("dn2", CreateColor(255,235,59));
#------
DefineGlobalColor("sqz1", Color.ORANGE);#CreateColor(255,152,0));
DefineGlobalColor("sqz2", Color.RED);#CreateColor(255,82,82));
DefineGlobalColor("sqz3", Color.GRAY);#CreateColor(54,58,69));
DefineGlobalColor("sqz4", Color.GREEN);#CreateColor(76,175,80));


#AddLabel(yes, "Test Label", CreateColor(255,82,82));


#//BOLLINGER BANDS
def BB_basis = MovingAverage(MovAvgType, close, length);
def dev      = BB_mult * stdev(close, length);
def BB_upper = BB_basis + dev;
def BB_lower = BB_basis - dev;

#//KELTNER CHANNELS
def tr = TrueRange(high, close, low);
def KC_basis = MovingAverage(MovAvgType, close, length);
def devKC    = MovingAverage(MovAvgType, tr, length);
def KC_upper_high = KC_basis + devKC * KC_mult_high;
def KC_lower_high = KC_basis - devKC * KC_mult_high;
def KC_upper_mid  = KC_basis + devKC * KC_mult_mid;
def KC_lower_mid  = KC_basis - devKC * KC_mult_mid;
def KC_upper_low  = KC_basis + devKC * KC_mult_low;
def KC_lower_low  = KC_basis - devKC * KC_mult_low;

#//SQUEEZE CONDITIONS
def NoSqz   = BB_lower < KC_lower_low or BB_upper > KC_upper_low;# //NO SQUEEZE: GREEN
def LowSqz  = BB_lower >= KC_lower_low or BB_upper <= KC_upper_low;# //LOW COMPRESSION: GRAY
def MidSqz  = BB_lower >= KC_lower_mid or BB_upper <= KC_upper_mid;# //MID COMPRESSION: RED
def HighSqz = BB_lower >= KC_lower_high or BB_upper <= KC_upper_high;# //HIGH COMPRESSION: ORANGE

#//MOMENTUM OSCILLATOR
def hh = highest(high, length);
def ll = lowest(low, length);
def avg = (hh + ll) /2;
def avgSMA = (avg + KC_basis) / 2;
def mom = Inertia(close - avgSMA, length);

#//MOMENTUM HISTOGRAM COLOR
def iff_1 = if mom > mom[1] then  2 else  1;
def iff_2 = if mom < mom[1] then -2 else -1;
def mom_color = if mom > 0 then iff_1 else iff_2;

#//SQUEEZE DOTS COLOR
def sq_color = if HighSqz then 3 else
               if MidSqz then 2 else
               if LowSqz then 1 else 0;
#//ALERTS

AddLabel(ShowLabel, if sq_color==0 then "NO SQUEEZE" else
                    if sq_color==1 then "PRE-SQUEEZE" else #"LOW COMPRESSION" else
                    if sq_color==2 then "SQUEEZE" else "EXTREME SQUEEZE", #"MID COMPRESSION" else "HIGH COMPRESSION",
                    if sq_color==3 then GlobalColor("sqz1") else
                    if sq_color==2 then GlobalColor("sqz2") else
                    if sq_color==1 then GlobalColor("sqz3") else GlobalColor("sqz4"));

#//PLOTS

plot SQZ = if last then na else 0;          # 'SQZ'
#plot momentum = mom;                        # 'MOM'
#momentum.SetLineWeight(4);
#momentum.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
#momentum.AssignValueColor(if mom_color== 2 then GlobalColor("up1") else
#                          if mom_color== 1 then GlobalColor("up2") else
#                          if mom_color==-2 then GlobalColor("dn1") else
#                          if mom_color==-1 then GlobalColor("dn2") else Color.GRAY);
SQZ.SetLineWeight(2);
SQZ.SetPaintingStrategy(PaintingStrategy.LINE_VS_POINTS);
SQZ.AssignValueColor(if sq_color==3 then GlobalColor("sqz1") else
                     if sq_color==2 then GlobalColor("sqz2") else
                     if sq_color==1 then GlobalColor("sqz3") else GlobalColor("sqz4"));


#--- END OF CODE

#IronRod SMI histogram lower study ver4



input audioalarm=yes;

input Price = hlc3;

input RsqLength = 5;

input RsqLimit = .5;

input SmiLimit = 30;

input chopband2= 70;

input smibarbufr = 4;


def overbought = SmiLimit;

def oversold = -SmiLimit;

def percentDLength = 4;

def percentKLength = 5;


#Stochastic momentum index (SMI)

def min_low = Lowest(low, percentKLength);

def max_high = Highest(high, percentKLength);

def rel_diff = close - (max_high + min_low) / 2;

def diff = max_high - min_low;

def avgrel = ExpAverage(ExpAverage(rel_diff, percentDLength), percentDLength);

def avgdiff = ExpAverage(ExpAverage(diff, percentDLength), percentDLength);


plot chopband = if IsNaN(close) then Double.NaN else 0;


plot SMI = if avgdiff != 0 then avgrel / (avgdiff / 2) * 100 else 0;

#SMI.SetDefaultColor(Color.BLUE);

smi.DefineColor("Up", CreateColor(0, 153, 51));

smi.definecolor("weak", color.light_gray);

smi.DefineColor("Down", Color.RED);

smi.AssignValueColor(if smi > smi[1] then smi.Color("Up")

else if smi < smi[1]  then smi.color("down")

else smi.Color("weak"));

smi.SetLineWeight(2);

SMI.SetStyle(Curve.SHORT_DASH);

SMI.SetLineWeight(3);


PLOT AvgSMI = ExpAverage(SMI, percentDLength);

AVGsmi.DefineColor("Up", CreateColor(0, 153, 51));

avgsmi.definecolor("weak", color.light_gray);

AVGsmi.DefineColor("Down", Color.RED);

avgsmi.AssignValueColor(if avgsmi > avgsmi[1] then avgsmi.Color("Up")

else if avgsmi < avgsmi[1] then avgsmi.color("down")

else avgsmi.Color("weak"));

AVGsmi.SetLineWeight(3);

#smi1.SetPaintingStrategy(PaintingStrategy.DASHES);


plot smiBAR = AvgSMI;

smiBAR.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);

smiBAR.SetLineWeight(3);

smiBAR.DefineColor("upstrong", CreateColor (0, 255, 0));

smiBAR.DefineColor("weak", Color.LIGHT_GRAY);

smiBAR.DefineColor("downstrong", CreateColor(255, 51, 51));


smiBAR.AssignValueColor (if (smi + smibarbufr) >= smi[1] and smi > -SmiLimit then smiBAR.Color("upstrong")

       else if (smi - smibarbufr) <= smi[1] and smi < SmiLimit then smiBAR.Color("downstrong")

    else  smiBAR.Color("weak"));




#Labels

#AddLabel(yes, "SMI Legend: ", Color.BLACK);


#AddLabel(yes, "BULLISH", Color.UPTICK);

#AddLabel(yes, "BEARISH", Color.DOWNTICK);

#AddLabel(yes, "changing", Color.GRAY);

#AddLabel(yes, "MidLine: ", Color.BLACK);

#AddLabel(yes, "Trending", createColor(0,150,200));

#AddLabel(yes, "in ChopZone", Color.ORANGE);

#AddLabel(yes, "             SmiLimit= " + SmiLimit, Color.DARK_GRAY);


#alert (audioalarm and smi crosses avgsmi and smi <= -smilimit or SMI CROSSes #AVGSMI AND Smi >= smilimit,"SMI CROSS", alert.bar, sound.ring);
 
Last edited by a moderator:
Here's my setup with the Beardy Squeeze Pro, MTF Squeeze Labels, MTF Squeeze Histogram Labels, The Confirmation Trend Chart, and Volume Buy Sell Pressure with Hot Percent.

I modified the Beardy Squeeze Pro, MTF Squeeze Labels, and MTF Squeeze Histogram Labels so the colors will be aligned.

"NO SQUEEZE" = GREEN
"LOW COMPRESSION" (Pre-Squeeze) = GRAY
"MID COMPRESSION" (Squeeze) = RED
"HIGH COMPRESSION" (Extreme Squeeze) = ORANGE

Many thanks to:
samer800 (Beardy Squeeze Pro)
caseyjbrett (MTF Squeeze Labels and MTF Squeeze Histogram Labels)
Christopher84 & HODL-Lay-HE-hoo! (The Confirmation Trend Chart)
horserider (Volume Buy Sell Pressure with Hot Percent)

Shared chart link:
http://tos.mx/zW5xnwL

View attachment 19790
This is really good. Can you please post short video or write something on how you use all these signals and why?
 
@rajanv_us Here's a great educational video by John Carter himself, who created the Squeeze indicator:


I also like to use Mobius ABC Waves with the Squeeze indicator:

Post in thread 'TTM_Wave For ThinkorSwim' https://usethinkscript.com/threads/ttm_wave-for-thinkorswim.3788/post-93063

As well as the Mobius TMO:
Thread 'TMO True Momentum Oscillator For ThinkOrSwim' https://usethinkscript.com/threads/tmo-true-momentum-oscillator-for-thinkorswim.9413/

MTF TMO:
Post in thread 'Multi-Time Frame True Momentum Oscillator (MTF) for ThinkorSwim' https://usethinkscript.com/threads/...scillator-mtf-for-thinkorswim.1128/post-78048

Here's a little treat, the "Fighter Scalper Indicator" from this post is great for entry and exit (the input settings I like are "length" at default of 10 and the "emalength" at 40 instead of 50):

Post in thread 'Here are some of the indicators I use every day' https://usethinkscript.com/threads/here-are-some-of-the-indicators-i-use-every-day.4114/post-63149

Also, @HODL-Lay-HE-hoo! has a superb write up on how he trades "The Confirmation Trend Chart Setup | The End All Be All | For ThinkOrSwim"

https://usethinkscript.com/threads/...tup-the-end-all-be-all-for-thinkorswim.15257/


Learn these and use them individually as separate strategies or in confluence.

Hope this helps, wish you the best!
 
Last edited:
How do you use it to determine direction sqz will fire??
JFC says to use the histogram, but I hope we all know that this is not always true and can produce false breakouts. I think after watching the structure form many times, you'll start to know your higher probability plays for this indicator.
Like with all other indicators, this indicator should not be used by itself to determine direction, to be honest, this indicator should only be used to determine whether there is a squeeze or not. If you're strategy is based around the squeeze, just understand that the squeeze just means that a big move is imminent, it will not show you the direction.
Personally, I use the EMAs, market structure, patterns and confirmation to determine direction.
You may want to wait for confirmation and perhaps use confirmation indicators with this indicator for higher probability plays, just understand that this indicator will not give you the direction.

With that said, I've added momentum indicator to the squeeze indicator found here: https://usethinkscript.com/threads/beardy-squeeze-chart-setup-for-thinkorswim.16738/#post-132203

I find using the momentum on the 10 minute works well, but again, it's not 100%.
The script with momentum indicator is below, hope this helps and good luck out there.

# TD Ameritrade IP Company, Inc. (c) 2007-2023
# Momentum indicator

declare lower;

input lengthx = 20;
input price = close;
input showBreakoutSignals = no;

assert(lengthx > 0, "'length' must be positive: " + lengthx);

plot Momentumx = price - price[lengthx];
plot ZeroLine = if isnan(close) then double.nan else 0;
plot UpSignal = if Momentumx crosses above ZeroLine then ZeroLine else Double.NaN;
plot DownSignal = if Momentumx crosses below ZeroLine then ZeroLine else Double.NaN;

UpSignal.SetHiding(!showBreakoutSignals);
DownSignal.SetHiding(!showBreakoutSignals);

Momentumx.AssignValueColor(if Momentumx < zeroLine then color.Red else if Momentumx > zeroLine then Color.Cyan else Color.White);
Momentumx.SetLineWeight(2);
UpSignal.SetDefaultColor(Color.UPTICK);
UpSignal.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
DownSignal.SetDefaultColor(Color.DOWNTICK);
DownSignal.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);


## Squeeze

#// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
#// ?? Beardy_Fred
#indicator('Beardy Squeeze Pro', shorttitle='Squeeze', overlay=false, precision=2)
# Converted by Sam4Cok@Samer800 - 05/2023
# https://usethinkscript.com/threads/beardy-squeeze-chart-setup-for-thinkorswim.16738/#post-132203

input ShowLabel = yes; # "Alert Price Action Squeeze"
input MovAvgType = AverageType.SIMPLE;
input length = 20; # "TTM Squeeze Length"
input BB_mult = 2.0; # "Bollinger Band STD Multiplier"
input KC_mult_high = 1.0; # "Keltner Channel #1"
input KC_mult_mid = 1.5; # "Keltner Channel #2"
input KC_mult_low = 2.0; # "Keltner Channel #3"

def na = Double.NaN;
def last = isNaN(close);

#--- Color
DefineGlobalColor("up1", Color.Green); #CreateColor(0,188,212));
DefineGlobalColor("up2", Color.Dark_Green); #CreateColor(41,98,255));
DefineGlobalColor("dn1", Color.Dark_Orange); #CreateColor(255,82,82));
DefineGlobalColor("dn2", Color.Yellow); #CreateColor(255,235,59));
#------
DefineGlobalColor("sqz1", Color.red); #CreateColor(255,152,0));
DefineGlobalColor("sqz2", Color.Plum); #CreateColor(255,82,82));
DefineGlobalColor("sqz3", Color.Blue);#CreateColor(54,58,69));
DefineGlobalColor("sqz4", Color.Dark_Gray);#CreateColor(76,175,80));

#//BOLLINGER BANDS
def BB_basis = MovingAverage(MovAvgType, close, length);
def dev = BB_mult * stdev(close, length);
def BB_upper = BB_basis + dev;
def BB_lower = BB_basis - dev;

#//KELTNER CHANNELS
def tr = TrueRange(high, close, low);
def KC_basis = MovingAverage(MovAvgType, close, length);
def devKC = MovingAverage(MovAvgType, tr, length);
def KC_upper_high = KC_basis + devKC * KC_mult_high;
def KC_lower_high = KC_basis - devKC * KC_mult_high;
def KC_upper_mid = KC_basis + devKC * KC_mult_mid;
def KC_lower_mid = KC_basis - devKC * KC_mult_mid;
def KC_upper_low = KC_basis + devKC * KC_mult_low;
def KC_lower_low = KC_basis - devKC * KC_mult_low;

#//SQUEEZE CONDITIONS
def NoSqz = BB_lower < KC_lower_low or BB_upper > KC_upper_low;# //NO SQUEEZE: GREEN
def LowSqz = BB_lower >= KC_lower_low or BB_upper <= KC_upper_low;# //LOW COMPRESSION: BLACK
def MidSqz = BB_lower >= KC_lower_mid or BB_upper <= KC_upper_mid;# //MID COMPRESSION: RED
def HighSqz = BB_lower >= KC_lower_high or BB_upper <= KC_upper_high;# //HIGH COMPRESSION: ORANGE

#//MOMENTUM OSCILLATOR
def hh = highest(high, length);
def ll = lowest(low, length);
def avg = (hh + ll) /2;
def avgSMA = (avg + KC_basis) / 2;
def mom = Inertia(close - avgSMA, length);

#//MOMENTUM HISTOGRAM COLOR
def iff_1 = if mom > mom[1] then 2 else 1;
def iff_2 = if mom < mom[1] then -2 else -1;
def mom_color = if mom > 0 then iff_1 else iff_2;

#//SQUEEZE DOTS COLOR
def sq_color = if HighSqz then 3 else
if MidSqz then 2 else
if LowSqz then 1 else 0;
#//ALERTS

AddLabel(ShowLabel, if sq_color==0 then "NO SQUEEZE" else
if sq_color==1 then "LOW COMPRESSION" else
if sq_color==2 then "MID COMPRESSION" else "HIGH COMPRESSION",
if sq_color==3 then GlobalColor("sqz1") else
if sq_color==2 then GlobalColor("sqz2") else
if sq_color==1 then GlobalColor("sqz3") else GlobalColor("sqz4"));

#//PLOTS

plot SQZ = if last then na else 0; # 'SQZ'
plot momentum = mom; # 'MOM'
momentum.SetLineWeight(4);
momentum.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
momentum.AssignValueColor(if mom_color== 2 then GlobalColor("up1") else
if mom_color== 1 then GlobalColor("up2") else
if mom_color==-2 then GlobalColor("dn1") else
if mom_color==-1 then GlobalColor("dn2") else Color.GRAY);
SQZ.SetLineWeight(2);
SQZ.SetPaintingStrategy(PaintingStrategy.LINE_VS_POINTS);
SQZ.AssignValueColor(if sq_color==3 then GlobalColor("sqz1") else
if sq_color==2 then GlobalColor("sqz2") else
if sq_color==1 then GlobalColor("sqz3") else GlobalColor("sqz4"));
 
Last edited by a moderator:

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
417 Online
Create Post

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top