Is It Possible to Add Custom Sounds to Custom Study Chart Alerts in TOS


0
0

I am currently using the TTM Trend (Licensed by John Carter to TOS) and the TTM Trend Alert that Pete Hahn created.  See below for text of alert.  I can only use the standard TOS sounds for the alert (Bell, Ding, Ring, Chimes) but would like to create Custom Sounds for this alert.  TOS currently does not have a Study Alert for the TTM Trend in it’s library.  If they did it would probably allow the drop down  for Custom Sounds that other regular study alerts have.

The TTM Trend Alert below requires that the TTM Trend be included in the Studies for the Chart.  The TTM trend study does not have source available?

I have been trying various different methods to add custom sounds to this custom alert with no success so I am trying to possibly get an answer to my question in this forum.

input compBars = 6;
input paintBars = yes;

def upTrend = TTM_Trend(compBars, paintBars).TrendUp;
def downTrend = TTM_Trend(compBars, paintBars).TrendDown;

def bullReversal = upTrend and downTrend[1] == yes;
Alert(bullReversal, “Bullish Trend”, Alert.BAR, Sound.RING);
def bearReversal = downTrend and upTrend[1] == yes;
Alert(bearReversal, “Bearish Trend”, Alert.BAR, Sound.RING);

 

Thanks for your help with this question.

Mike C

Marked as spam
Posted by (Questions: 1, Answers: 1)
Asked on March 28, 2017 10:59 am
2497 views
0
Private answer

The code for the TTM Trend will not function in the custom Study Alert. Not sure why, but I did just test it. So at this point the only way to get a custom sound alert using this indicator is to build and save a custom scan. Then set the alert options for that scan. (Yes, the alert settings for a custom scan support custom sounds) We demonstrate how to set the alert options on a scan in the video titled: “Thinkorswim Overnight Range Scan Alert“.

Here is the code you would use in the scan:

input compBars = 6;
input paintBars = yes;
def upTrend = TTM_Trend(compBars, paintBars).TrendUp;
def downTrend = TTM_Trend(compBars, paintBars).TrendDown;
# use this scan to find bullish trend reversals
plot scan = upTrend and downTrend[1] ;
# use this scan to find bearish trend reversals
#plot scan = downTrend and upTrend[1] ;

Marked as spam
Posted by (Questions: 37, Answers: 4087)
Answered on March 28, 2017 11:42 am
0
Private answer

Pete, thanks for the update and info.  I will try the code out and let you know how it works!  Again, thanks!  Mike C

Marked as spam
Posted by (Questions: 1, Answers: 1)
Answered on March 31, 2017 2:31 pm