Continuous Sound Alert


0
0

Pete,

Thanks for the help with logging in.

I’m trying to find a way to create a continuous sound alert when price moves above / below a certain threshold that continues until I wake up and delete the alert.

Due to my current location, trading is taking place while I need to sleep, so if I have position set up, I need an alert that keeps ringing until it awakes me and forces me to get up and shut it off.

I’ve tried the TOS support route.  They said they would forward my question to the Devs but I didn’t get the feeling that there was enthusiasm.

It looks like I could set up a study alert that can ring on every bar or by the tick as you mentioned.

Or; I was thinking about the possibility of adding a long playing mp3 file under custom sounds.

I’m a little familiar with VBA.  Isn’t there a way for Looping in TOS script?  Can TOS accept some VBA script?

Whichever way you think would be the best solution, I could use a little help getting started with the script and the mechanics necessary to add a custom alert to charts.

 

Your help will be greatly appreciated.

Marked as spam
Posted by (Questions: 1, Answers: 0)
Asked on January 1, 2018 4:26 am
588 views
0
Private answer

Thinkscript includes extremely limited looping. It can only loop through the bars of a chart, it cannot loop for a specified number of iterations on a single bar. So that is not an option.

RTD Function in MS Excel:

Visual Basic for Applications (VBA) is a programming language available to programs within the Microsoft Office suite. It cannot directly access anything in Thinkorswim. However you can use the RTD function to display live data from the Thinkorswim platform in an Excel spreadsheet. You can get the details here: https://www.hahn-tech.com/thinkorswim-rtd-excel/

Once you get your live data setup on the spreadsheet, you can write some custom macros in VBA that can handle the alert functionality you require. Since you have only mentioned an alert on price, the limited data available through RTD should be sufficient.

No Coding Required:

Before you go through all that, give this one a try. You also mentioned the idea of using a custom mp3 file that runs for an extended period of time. When you create a standard price alert, you have the ability to add and select your own custom sounds. (this is not available for a chart study alert). In order to create a price alert, simply right-click any chart, near the area of your desired price. From the right-click menu select “Create alert…”. If you have not used these before you’ll want to spend some time experimenting until you understand how all the settings work. I won’t cover all the settings here. But the screenshots below show were you can select a custom sound that you have added to the platform.

Marked as spam
Posted by (Questions: 37, Answers: 4079)
Answered on January 1, 2018 9:04 am