Audio alert when a stock price changes rapidly


0
0

Hi Pete,
I would like to be alerted whenever a stock (AAPL for example) has a rapid change in price—for example, changes more than 1% in 15 minutes.

I understand that I would need to create a watchlist first, in order to receive audio alerts, then add a study to the  watchlist. So then whenever AAPL meets the criteria of the study, it will be added to the watchlist, and thus I will receive an alert.

So my question is, what would be the code for the study for this? Note, it is just to track a single stock, like AAPL, not the whole universe of stocks.

Marked as spam
Posted by (Questions: 7, Answers: 12)
Asked on July 27, 2023 7:36 pm
58 views
0
Private answer

Before providing the solution I need to clear up some details so everyone understands how this is implemented. The steps described by the author of the post requires some corrections:

There is no way to have an audible alert triggered from a custom script inserted into a watchlist gadget. If you plan to work with one ticker symbol at a time, the correct tool to use would the "Study Alert". You can read about the various alert types on the following post in the Q&A Forum: https://www.hahn-tech.com/ans/generate-alerts-from-macdstrat-chart-strategy/

If you wanted to use this solution to apply to a wide range of ticker symbols you would need to apply this to a custom scan, save that scan, and then use that to generate a dynamic alert. Those steps are described in the following video:

https://www.hahn-tech.com/thinkorswim-scans-beginner-to-advanced/

I contacted the author of the post by email to get clarification on what time frame is used and how the "percent change" is computed. The response was to use the 15 minute time frame and to compare the current close to the close of 15 minutes prior. Which means our solution is supper simple. Just only line of code does the job:

plot signal = close > close[1] * 1.01 or close < close[1] * 0.99;

That line of code is checking for 1% moves in either direction. All it's doing is comparing the current close to the previous close after multiplying that previous close to adjust it to a 1% change, up or down.

Marked as spam
Posted by (Questions: 37, Answers: 4087)
Answered on July 28, 2023 8:29 am
0
Great thank you Pete. And to be clear for everyone reading this, how would you go about creating a Study Alert? Simply right-click on the chart and under price, choose the custom study? And do you select ”is true” under the condition, instead of price? Thanks Pete, Davide
( at July 28, 2023 4:09 pm)
1
Study Alerts are found in the MarketWatch tab of Thinkorswim. The button is located in the upper right corner. Thinkorswim provides their own documentation here: https://tlc.thinkorswim.com/center/howToTos/thinkManual/charts/Useful-Tools/Study-Alerts I have not published a video specifically on this topic, but I do demonstrate how to use Study Alerts in the video title "Thinkorswim Auto-Trade Almost", located here: https://www.hahn-tech.com/thinkorswim-autotrade-almost/
( at July 28, 2023 4:29 pm)
1
But yes, the instructions you described is another way to access the Study Alert. I have always created them from the MarketWatch tab.
( at July 28, 2023 4:32 pm)