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"));