How to set SOUND Alerts in Amibroker Scanner ?

The Sound Alerts for the Amibroker scanner are not set inside the main software settings. A single line of code has to be included with your AFL, if you wish to generate sound alerts.

Below is an example of an AFL code, that scans on 5 min candles for 8 34 ema BUY SELL Crossover’s and also generate sound alerts.

TimeFrameSet(in5Minute);
Buy = Cross(EMA( Close , 8 ) , EMA( Close , 34 )) ;
Sell = Cross(EMA( Close , 34 ) , EMA( Close , 8)) ;
AlertIf( Buy, "SOUND C:\\Windows\\Media\\Windows Notify.wav", "Audio alert", 1 );
AlertIf( Sell, "SOUND C:\\Windows\\Media\\Windows Notify.wav", "Audio alert", 2 );

In the above example, Line 4 and 5 are the Sound ALERT codes that we use in the AFL Scanner file.

Line 4 instructs Amibroker to play the “windows notify.wav” it finds a stock with a matching BUY condition.

Line 5 instructs Amibroker to play the “windows notify.wav” it finds a stock with a matching SELL condition.

You can copy the above lines 4 and 5 and paste it along your own AFL Scanner codes. Just make sure the sound file you want to playback is present in the correct directory.