chartid = GetChartID();
Buy = Cross( Close, Study( "RE", chartid ) );
Sell = Cross( Study( "SU", chartid ), Close );
// generating audio alerts when condition is detected
AlertIF( Buy, "SOUND C:\\Windows\\Media\\Ding.wav", "Audio alert", 1, 15, 1 );
AlertIF( Sell, "SOUND C:\\Windows\\Media\\Ding.wav", "Audio alert", 2, 15, 1 );