Page 1 of 1

Custom audio alerts with MC

Posted: Nov 13 2006
by Leggos
Hello,

I wanted to ask if the "playsound" Easylanguage command works with MC. I tried the following code as an example with 'update on every tick' turned on, but got no sound. This works as it should on TS:

Var: Strategy_Alert("C:\Sounds\strategy alert.wav");

if h>l THEN Condition1 = PlaySound(Strategy_Alert);

Is it possible to have custom made alerts played with MC? Is there another similar command which I should know about?

Thanks

Posted: Nov 14 2006
by Alex Kramer
In the Study settings, Alerts tab you can select any .wav file to be played when the alert is activated.

Posted: Nov 15 2006
by Leggos
Yes, but this allows only one particular alert sound to be played for the particular study loaded.

On the other hand, the functionality of the "playsound" command in TS allows for multiple alert sounds to be played, each corresponding to a different condition triggering an alert in the same study. I believe you realise the flexibility of this option, especially when it comes to complex studies that combine several elements or strategies. It would be great if this could also be implemented in MC.

Posted: Nov 16 2006
by Alex Kramer
Here's a working in the latest beta example

Condition1 = (PlaySound("*Path to file e.g.* e:\explode.wav"));
Condition1 = (PlaySound("*Path to file e.g.*e:\firealarm.wav"));
If high < *INSERT A VALUE* Then
Condition1 = true else Condition2 = True

so if the new quote value is above a set value, one sound plays, if equal or lower = another. Works great on ticks ;)

Posted: Nov 18 2006
by Leggos
Thanks a lot Alex, that's exactly what I was looking for! Very glad it works with MC.