Hello
I can set an alert on a trend line via the code . Can I select the audio WAV file to be played if the alert is triggered? I could code it the hard way by seeing if a price triggered a target and act upon it, but since I could modify directly the type of alert conditions, I suppose that I could also select the audio file
Martin
TL Alert: How to set the audio via code
- Angelina MultiСharts
- Posts: 260
- Joined: 28 Dec 2016
- Has thanked: 28 times
- Been thanked: 66 times
Re: TL Alert: How to set the audio via code
Hello arjfca,
Alert sounds can only be specified in Format Study -> Alerts tab.
But you can use the PlaySound keyword.
Strictly speaking, it's not an alert but it does the trick: it can play the specified audio file when the condition is met.
Alert sounds can only be specified in Format Study -> Alerts tab.
But you can use the PlaySound keyword.
Strictly speaking, it's not an alert but it does the trick: it can play the specified audio file when the condition is met.
Re: TL Alert: How to set the audio via code
Hello AngelinaHello arjfca,
Alert sounds can only be specified in Format Study -> Alerts tab.
But you can use the PlaySound keyword.
Strictly speaking, it's not an alert but it does the trick: it can play the specified audio file when the condition is met.
I'm already using it. The goal was to select via the code the given message to be sent.
Martin
- TJ
- Posts: 7744
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: TL Alert: How to set the audio via code
@Angellina:
What Martin proposing is to add one more parameter to the keyword.
eg.
TL_SetAlert ( TL_ID , AlertStatus , "PathFilename" )
Where
PathFilename - a string expression specifying the path and filename of the wave file to be played.
example:
Value1 = TL_SetAlert ( 3 , 2 , "C:\ding.wav" ) ;
What Martin proposing is to add one more parameter to the keyword.
eg.
TL_SetAlert ( TL_ID , AlertStatus , "PathFilename" )
Where
PathFilename - a string expression specifying the path and filename of the wave file to be played.
example:
Value1 = TL_SetAlert ( 3 , 2 , "C:\ding.wav" ) ;
- Angelina MultiСharts
- Posts: 260
- Joined: 28 Dec 2016
- Has thanked: 28 times
- Been thanked: 66 times
Re: TL Alert: How to set the audio via code
Thanks TJ.
Martin, can you please submit a feature request and post a link here?
Martin, can you please submit a feature request and post a link here?