Keltner/Bollinger Squeeze For ThinkOrSwim

Thonex

New member
To use the Keltner/Bollinger Squeeze indicator in day trading, look for situations where the Bollinger Bands contract and fall completely within the Keltner Channels, signifying a period of low volatility; when the bands then expand beyond the Keltner Channels, it indicates a potential breakout and is considered a "squeeze firing," prompting you to enter a trade based on the direction of the price movement following the breakout.

Key points to remember:
  • Identifying a Squeeze:
    When the Bollinger Bands are completely contained within the Keltner Channels, a squeeze is occurring, showing low volatility and potential for a significant price move soon.

  • Breakout Signal:
    When the Bollinger Bands expand beyond the Keltner Channels, it signals a potential breakout, and you should consider entering a trade in the direction of the price movement.

  • Confirmation with Price Action:
    Don't solely rely on the squeeze indicator; use price action and other technical indicators to confirm the breakout direction and potential trade entry points.
How to trade with a Keltner/Bollinger Squeeze:
  • Buy Signal:
    If the price breaks above the upper Bollinger Band after a squeeze, consider entering a long position.

  • Sell Signal:
    If the price breaks below the lower Bollinger Band after a squeeze, consider entering a short position.

  • Stop Loss Placement:
    Place your stop-loss order on the opposite side of the breakout level, outside the recent consolidation range.
Important considerations:
  • Timeframe Selection:
    Choose a timeframe that aligns with your trading style, but generally, shorter timeframes are preferred for day trading.

  • False Signals:
    Squeeze indicators can sometimes generate false signals, so it's crucial to use other technical analysis tools for confirmation.

  • Market Conditions:
    The Keltner/Bollinger Squeeze is most effective in volatile markets where price consolidation periods are followed by sharp breakouts.

I concatenated a script for using the Keltner channel and Bolli bands to illustrate squeezes without adding more colored lines/chaos to a chart. The blue-greenish cloud manifests when the upper & lower ranges of the Keltner channel move outside the Bollinger band's range. I find it easier on the eyes. Anyway... It's my first post here so I thought I'd contribute something... and I'm sure I'll be asking many questions on other forums because I haven't coded a thing since before the pandemic.

Keltner-Bolli.png


Here's the code -- Enjoy:

Code:
#
# Combined Keltner and Bolli by AK
#

#============ Bolli Bands ====================
input Show_Bolli = 1;
input price = close;
input displace = 0;
input Bolli_length = 20;
input Num_Dev_Dn = -2.0;
input Num_Dev_up = 2.0;
input averageType = AverageType.Simple;

def sDev = stdev(data = price[-displace], length = Bolli_length);

def MidLine = MovingAverage(averageType, data = price[-displace], length = Bolli_length);
def Bolli_LowerBand = MidLine + num_Dev_Dn * sDev;
def Bolli_UpperBand = MidLine + num_Dev_Up * sDev;


AddCloud(Bolli_LowerBand, Bolli_UpperBand, color.gray, color.gray,no);
#============ End of Bolli Bands ====================

#============= Kelnter Channels ===============
#
# TD Ameritrade IP Company, Inc. (c) 2007-2017
#

declare weak_volume_dependency;

input Kelt_displace = 0;
input Kelt_factor = 1.5;
input Kelt_length = 20;
input Kelt_price = close;
input Kelt_averageType =averageType.SIMPLE;
input Kelt_trueRangeKelt_averageType = averageType.SIMPLE;

def shift = Kelt_factor * MovingAverage(Kelt_trueRangeKelt_averageType, TrueRange(high, close, low), Kelt_length);

def average = MovingAverage(Kelt_averageType, Kelt_price, Kelt_length);

def Avg = average[-Kelt_displace];
#Avg.SetDefaultColor(GetColor(1));

def Kelt_Upper_Band = average[-Kelt_displace] + shift[-Kelt_displace];
#Kelt_Upper_Band.SetDefaultColor(GetColor(8));

def Kelt_Lower_Band = average[-Kelt_displace] - shift[-Kelt_displace];
#Kelt_Lower_Band.SetDefaultColor(GetColor(5));

#============= End of Kelnter Channels ===============

def Bolli_inside_Kelner = if Bolli_UpperBand < Kelt_Upper_Band and Bolli_LowerBand > Kelt_Lower_Band then 1 else 0;

def Color_BG = if Bolli_inside_Kelner == 1 then Double.POSITIVE_INFINITY else Double.NEGATIVE_INFINITY;  

#addcloud(Color_BG, - Color_BG, Color.light_gray,color.black);
addcloud(if Bolli_inside_Kelner then Kelt_Lower_Band else double.NaN, if Bolli_inside_Kelner then Kelt_Upper_Band else double.Nan, Color.gray,color.cyan);
 
Last edited by a moderator:

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

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
388 Online
Create Post

Similar threads

Similar threads

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