Intraday TTM Squeeze Watchlist Columns Not Working

JBL73

New member
VIP
I've used the TTM Squeeze for quite some time. On intraday squeezes, Eric Purdy's code seems hit or miss. Anyone else have this issue? Include Extended Hours is unchecked. Not sure what the problem is. Code:

# Simpler Trading Squeeze watchlist column - Eric Purdy 2017

# Shared Link - http://tos.mx/5cpgKa
def sqz = !TTM_Squeeze().SqueezeAlert;
def direction = TTM_Squeeze()>TTM_Squeeze()[1];
def count = if sqz and !sqz[1] then 1 else count[1]+1;
def fired = if !sqz and sqz[1] then 1 else 0;
def firedCount = if fired then 1 else firedCount[1]+1;
def firedDirection = if fired then direction else firedDirection[1];
addLabel(yes, if sqz then “4HR:” + count else if sum(fired,5) then “Fired:” + firedCOunt + if firedDirection then ” Long” else ” Short” else “-”, if sqz then color.red else if sum(fired,5) and firedDirection then color.green else color.orange);

I left off the label portion of the code:

AddLabel(yes, if sqz then “1H Sqz:” + count else if Sum(fired, 5) then “Fired:” + firedCount + if firedDirection then ” Long” else ” Short” else “-”, if sqz then Color.RED else if Sum(fired, 5) and firedDirection then Color.GREEN else Color.ORANGE);

"Hit or miss" means it's about 80% at identifying Squeezes and Squeeze fires correctly on an Intraday timeframe (Hourly or 4 Hour). Daily, Weekly, Monthly work perfectly. I have been studying the issue for a while now and thought someone in the community might know why. The code from Purdy (Simpler Trading) has been floating around since 2017 so I think it is simply the intraday timeframe columns don't work well with it. Not sure.
 
Solution
You would need to provide images of how you are interpreting "hit and miss".

It is important to note that most indicators on the forum rely on the current candle, which can result in "false signals." This occurs because the current bar updates with each tick until it closes, providing a definitive signal only after the candle has completed.

If this does not align with the issue you are describing, please provide annotated images highlighting the discrepancies, along with the relevant script and a shared link to the chart for further analysis.

How to create a shared chart link:
https://usethinkscript.com/threads/how-to-share-a-chart-in-thinkorswim.14221/
You would need to provide images of how you are interpreting "hit and miss".

It is important to note that most indicators on the forum rely on the current candle, which can result in "false signals." This occurs because the current bar updates with each tick until it closes, providing a definitive signal only after the candle has completed.

If this does not align with the issue you are describing, please provide annotated images highlighting the discrepancies, along with the relevant script and a shared link to the chart for further analysis.

How to create a shared chart link:
https://usethinkscript.com/threads/how-to-share-a-chart-in-thinkorswim.14221/
 
Solution
Here is the column screenshot using the script above including the label which I left off the first post. It shows AKAM with 1H Squeeze Fire Short. Again, this is the Purdy code from 2017 (no knock on Purdy, he is a great guy and writes great scripts - I'm just trying to reconcile/figure out what is the matter). The 1H column does not have after hours checked.
1732854075905.png

Here is a 1-hour chart with the standard Squeeze.
1732854212721.png


There is no Squeeze fire. Now, I've seen these inconsistencies on say 10-20% of the 1H and 4H Purdy columns versus the standard TTM Squeeze 1H and 4H timeframes I watch. I was just asking for some assistance on it and whether others using the Purdy code experience the same thing. ChatGPT seems to think it's a column issue with TOS. I don't see the same inconsistencies outside of intraday timeframes. Hope that makes sense.
 
Last edited:

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
307 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