TTM Squeeze Scanner

This script scans for TTM Squeezes for the crypto symbols included in the body of the script. The timeframe for the squeeze scan is controlled within the input not the chart.

This script is a merge of @Nico.Muselle's TTM Squeeze script and @QuantNomad's custom screener script. Thanks to both of them!
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


Hi! thanks for sharing this script. Can I use the scrip for screening non-crypto stocks as well?
+24 Reply
gaz_0001 jperazo

@chchodler - kindly left the source code open, so you can modify the tickers to show you what you are looking for. Change S1 ticker, and label src for S1.
+4 Reply
@chchodler - I setup the TTM Squeeze Scanner with the FTSE & Dow as the only two tickers. It does seem to detect the squeeze for both of the tickers but dosnt label them. If you have 20 tickers scanning, how would you know which ticker the squeeze is on?
Also for the histogram - with 20 tickers in the script, there is one this a combination of all the combined tickers? It doesnt seem to align up with any of them perfectly.
+9 Reply
refinery gaz_0001
@gaz_0001, Not sure if I'm 100% right, but it seems like the histogram plotted is for the current ticker you have the script running on at that moment.

I use Heikin Ashi (HA) candles over OHLC candles. Do you happen to know how to update the code/script so it spits out tickers on the screener for squeezes on the HA candles?

I can't seem to get it to work:
Hi chchodler,

Thanks for this great info. FYI, I am quite new to trading and currently I am studying Squeeze Momentum Indicator using Squeeze Momentum Indicator (SQZMOM_LB) in my chart. My main issue that I have now is to screen for stocks that are within this SMI setup. Basically i have set my screener criteria as follow :

Upper Bollinger Band lower than Upper Keltner Channel
Lower Bollinger Band above than Lower Keltner Channel
Upper Keltner Channel above than Upper Bollinger Band
Lower Keltner Channel below than Lower Bollinger Band

But it seems that the list of stocks is too little and some them just remains the same for few days.
I am just wondering if there's any way i could optimize my screener using your scripting method?
Looking forward to hear from you.

adamacho92 adamacho92
My question is, is it possbile to use this script to screen for all the stocks? Or is it that we need to associate this script per stock at one time?
thank u sir
any chance of writing a script just like this one. In Settings under Input the user can enter 2 MAs , select a time frame, if the slower MA crosses the faster MA for any of the symbols included in the script, the screener window will display the symbols just like this script??
Hi, thanks for sharing. Could you include an EMA Filter like the one John Carter uses (21 and 34 EMA {Up or Down})? This would reduce the number of false signals, especially if we look at smaller timeframes.
is this script possible to use with stocks?
I'm using the script and changed the tickers from cypto and that works fine.

However I use Heikin Ashi (HA) candles over OHLC ("regular") candles and I notice there is a discrepancy in the screener results.

It seems like the actual TTM Squeeze plot/histogram is fine and seems to properly use the HA candles when my chart has them selected on my chart view, but the screener seems to only post tickers based on the TTM Squeeze results using OHLC candles.

For example, I have NVDA, STMP, HZNP as tickers in the source code.

Inputs have been changed where the Timeframe is "Same as symbol". Using 1D for now.

TTM Squeeze for NVDA, 1D shows NO red dot for the last day using OHLC candles, BUT it does for HA candles.
TTM Squeeze for STMP, 1D shows a red dot for the last day using OHLC candles, AND it also does for HA candles.
TTM Squeeze for HZNP, 1D shows a red dot for the last day using OHLC candles, AND it also does for HA candles.

On my chart view, when I swap between OHLC candles or HA candles with the script, the screener results only show the below. It somehow is missing NVDA from the screener results when I have HA candles selected.


How can I update the script to reflect HA candle results for the TTM Squeeze instead of OHLC candles?

Here's a collage of charts/images I've done in the Imgur link here to show what I'm seeing:

Home Stock Screener Forex Screener Crypto Screener Economic Calendar About Chart Features Pricing Refer a friend House Rules Help Center Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Blog & News Twitter
Profile Profile Settings Account and Billing Referred friends Coins My Support Tickets Help Center Private Messages Chat Sign Out