TTM-Squeeze Alert

stormy77

Member
I'm using the TD Ameritrade default TTM-Squeeze. I wanted to see if I can add an audible alert when a squeeze is fired

The only code shown is:

#
# TD Ameritrade IP Company, Inc. (c) 2009-2022
#
# Source code isn't available.

declare lower;

input price = CLOSE;
input length = 20;
input nK = 1.5;
input nBB = 2.0;
input alertLine = 1.0;

plot Histogram = Double.NaN;
plot VolComp = Double.NaN;
plot SqueezeAlert = Double.NaN;

Can anyone help?
 
Last edited by a moderator:

halcyonguy

Well-known member
VIP
Lifetime
I'm using the TD Ameritrade default TTM-Squeeze. I wanted to see if I can add an audible alert when a squeeze is fired

The only code shown is:

#
# TD Ameritrade IP Company, Inc. (c) 2009-2022
#
# Source code isn't available.

declare lower;

input price = CLOSE;
input length = 20;
input nK = 1.5;
input nBB = 2.0;
input alertLine = 1.0;

plot Histogram = Double.NaN;
plot VolComp = Double.NaN;
plot SqueezeAlert = Double.NaN;

Can anyone help?

eloborate on what 'fired' means.
just the first bar , at the start of a squeeze?
or every bar during a squeeze?


an alert needs a true condition to be enabled.
https://tlc.thinkorswim.com/center/reference/thinkScript/Functions/Others/Alert


if you want the output of a study to turn on an alert, you need to determine which plot variable to use.

you listed the variables. but If you don't know what they are, then look up the study and write down the plot variables.

TTM_Squeeze
https://tlc.thinkorswim.com/center/reference/Tech-Indicators/studies-library/T-U/TTM-Squeeze

you can create a study that displays the values of those plot variables and then you can look at them and compare to what the chart is doing and determine which one you need to use.

Code:
declare lower;
def th = TTM_Squeeze().Histogram;
def tv = TTM_Squeeze().VolComp;
def ts = TTM_Squeeze().SqueezeAlert;
plot z = 0;
addchartbubble(1, 0,
th + " h\n" +
tv + " v\n" +
ts + " s"
, color.yellow, yes);
 

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.
Top