Questions About Alerts In ThinkOrSwim


New member
The thinkscript study I created and shared yesterday, I try to use it in setting alert. But was unable to do it. The "OK" button stayed grayed out and was not available for me to continue to the alert. Then I saw the following message: "rec usage is not allowed in this context"

I'm looking to set up Conditional Study Alerts found under MarketWatch tab. In particular I wish to use the Languerre RSI, along with a few other conditions, to trigger alert to phone. The problem is the Rec Coding. If you enter this L-RSI into the study alert tab you get the statement found in the title. I was wondering if there was a work around. Thanks.
I'm not sure if alerts generated by indicators will show up on the mobile app. I never experience such thing so I can't confirm it. Regarding the error, @markos is familiar with the L-RSI indicator, he might be able to help.

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

Thanks @BenTen (y)

Hey @Brady0524 We can get this fixed. I will have to look into it when I get home tonight. There are a number of variations to this code.

In the meantime, please go to Tutorials and find the "how to guide for the RSI Laguerre indicator". Please read all the way down.

Next, open the studies that you are using, then copy and paste the whole code in here. Both the chart study and the scan study. Be sure to put
#??Code??# In front of each code before you post the reply.

You may need an updated code. For one reason or another ToS broke the RSI Lg scanner during a language upgrade last year.
In that vein, please insert this scan to see if it works or not with your current code.
Is anyone noticing delays with scan alerts? Sometimes it's several minutes long. As a day trader, getting an alert a few minutes late could mean you miss an entry. I'm using SMA's, EMA's, VWAP, LinearRegReversal and LinearRegressionSlope in my scan, but it doesn't really matter what studies I use, I oftentimes get delays on desktop and mobile.

I reached out to Support and I keep getting different answers. Some reps are saying that there shouldn't be a delay. Then some reps say that the delay is 5 minutes. I don't know who or what to believe. I'm considering using trade ideas for alerts, but that would be a huge waste of money.
Last edited by a moderator:
That is known, or at least to me, and I have been telling people that. The only way that you can get real-time scan results is by clicking that Scan button whenever you want to see new result.
I stopped using the scanner watchlist because of this problem. Usually between 3-5 mins. Sometimes I get the results in real-time though, but that is rare. An alternative solution to this is by adding a set of alerts into your code. As soon as the signal appears you will get notified. This solution will not work if you want to find new stocks from a basket of watchlists.
What do you mean by this "An alternative solution to this is by adding a set of alerts into your code." What exactly are you adding to thinkscript to get alerts in real-time?

"This solution will not work if you want to find new stocks from a basket of watchlists." Are you saying that you can't get real-time scan alerts from a watchlist of stocks and You can only get real-time results when scanning all stocks?
@GetRichOrDieTrying With the Alert() function added to your indicator, you will get notified of new signals in real-time. But the catch is that you must be viewing that chart (or at least have it in the background). This does not work for when you try to find new stocks because imagine loading up 100s of different stocks and have them run in the background. Will likely to break your ToS.
Does anyone know how to create real-time alerts for stocks you have pulled up on your grid? As you're probably aware, alerts from dynamic scan watchlist have a global 9 - 12 minute delay. I need real-time alerts when my study conditions are triggered. TOS support gave me this page, but I don't know how to edit the code for my two studies. Can you someone help or provide guidance?
Alert 1 Thinkscript:

StochasticFull()."FullK" crosses above StochasticFull()."FullD"

Alert 2 Thinkscript:

StochasticFull()."FullK" is greater than StochasticFull()."FullD"
Testing the alert function I notice the Alert Book keeps adding alerts triggered, cancelled to no end. I cannot find a way to delete these no longer active alerts - Searching online returns dozens of instruction how to set alerts but not one how to clean out the alert book. I thought restarting the platform but no such luck. Thanks for reading.
Thanks - I am in that window - it shows "0 active, 0 waiting, 3 triggered, 4 canceled" Yet all seven sit there in that Alert Book table. I can click left right whatever is clickable there is no delete "triggered, inactive, canceled alerts"
How do I get rid of these no longer needed alerts. Similar to cleaning out history on a browser.
After a few weeks it will show hundreds of old alerts?
Sorry, don't understand what you mean - status like in account status is "ok to trade". Can't find no other "status" and not in reference how to reset the alert book to zero. Hard to believe that this is so complicated. Even old style Metatrader4 makes it easy to delete alert history.
@Shaishen Go to Marketwatch > Alerts > Actions and cancel your alerts there.



  • Ho3nXdY.png
    196.3 KB · Views: 130
Thanks Ben - yes, I was aware of that function. It cancels the alert but does not delete the actual line in that table - like history in a browser. In any case ...
...this morning the alert book was clear and empty 👏

I guess it takes 24 hours and the platform automatically resets the alert book history to zero.
Thanks for all the input - one never stops learning.
Hello. I'm pretty new to this site and ThinkScript but I'm loving it so far. I apologize if this is a dumb question. I have done considerable searching but have not found an answer. Any help is greatly appreciated!

I have a lower study I use that doesn't signal very often. Instead of having to watch the chart all day I wanted to make it give an audible alert when triggered. I was able to figure out how to do that by adding this to the script:

alert( Signal1, "BUY", Alert.BAR, Sound.Bell );
alert( Signal2, "SELL", Alert.BAR, Sound.Chimes );

I've also figured out how to record my own audio file .mp3s and add them to the alerts section for the upper chart (right click, create alert, notify with sound, "play sound" drop-down, edit custom sounds, ...) So I can set an alert on the chart and have it play my custom sounds, but I want to make my LOWER study play custom alert sounds.

I've tried changing:
alert( Signal1, "BUY", Alert.BAR, Sound.Bell );
alert( Signal1, "BUY", Alert.BAR, Sound.Custom1 ); and stuff like that to no avail.


Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
198 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.