Create an audible alert for new 10-minute HIGH/LOW

TheGrimmReaper

New member
I'm new to Thinkscript and would like to create a simple audible alert each time a given symbol makes a new 10-minute high (compared to the previous 10-minute period) and a new 10-minute low (again, compared to the previous 10-minute period). No pop-up required, just an audible alert to notify me when a new 10-minute high or low is reached on a symbol compared to the previous 10-minute time period. Thanks!
 
Solution
Hey there... I played around a bit with this today. Its so funny how you want the indicators during trading day, but then no time to really test or work on them during those hours haha :)

There are actually a few other quick examples I found around related to this (a few from @Len20), and none of them I know of directly would cause a audible alert but I will do some testing. I know you can create alerts easily when a watchlist changes

This is for 15 minutes although honestly I think for the watchlist you have to actually set the aggregation period up at the top... So if you chose 5 minutes, and set the value of bars to 2 it would be 10 minutes price change. Also, this is currently dollar amount price difference and its actually...

Chadnash

New member
Hey there... I played around a bit with this today. Its so funny how you want the indicators during trading day, but then no time to really test or work on them during those hours haha :)

There are actually a few other quick examples I found around related to this (a few from @Len20), and none of them I know of directly would cause a audible alert but I will do some testing. I know you can create alerts easily when a watchlist changes

This is for 15 minutes although honestly I think for the watchlist you have to actually set the aggregation period up at the top... So if you chose 5 minutes, and set the value of bars to 2 it would be 10 minutes price change. Also, this is currently dollar amount price difference and its actually that many bars 'past' so if you were looking at this towards the end of a 5 minute bar it could almost be 20 minutes. This could always be tweaked to get current high or low of that bar and not close... and you can uncomment out the lines above it if you want the percent value and not the dollar amount.

I will tweak the code a bit so that even if it can't be audible alert, it could display a specific color if maybe the value was in a range above or below a certain amount. I think this is a start to what you're looking for though, feel free to comment and let me know your thoughts.

https://tos.mx/LTEmLSP

Code:
def agg = AggregationPeriod.FIVE_MIN;

input barsAgo = 3;

def price = close;
def oldPrice = close[barsAgo];

#plot change = Round(100 * ((price / oldPrice) - 1), 1);
#change.AssignValueColor( if change < 0 then Color.RED else Color.GREEN);

plot gap = (price -oldPrice);
gap.assignValueColor(if gap > 0 then color.green else if gap < 0 then color.red else color.black);

Thanks!

Chad
nashtech.xyz
 
Last edited by a moderator:
Solution

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