Thanks Amit for your reply. This works well for me.
Try this , but first define the line from Right Click on the line and parameters to SU or RE
Code:
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
_SECTION_BEGIN("Sound alarm on Trendline Break ");
////////////////////////////// Sound alarm on Trendline Break /////////////////////////////////////
BuySignal = Cross( Close, Study( "SU", GetChartID() ) );
SellSignal = Cross( Study( "SU", GetChartID() ), Close );
ShortSignal = Cross( Study( "RE", GetChartID() ), Close );
CoverSignal = Cross( Close, Study( "RE", GetChartID() ) );
PlotShapes( BuySignal* shapeUpTriangle + SellSignal * shapeDownTriangle, IIf( BuySignal, colorGreen, colorRed ), Offset = -1);
//AlertIf( BuySignal, "SOUND C:\\Windows\\Media\\Ding.wav", "Trendlinebreak alert on "+FullName() + "SheetNumber" + SheetNum, 1, 1+2+4+8, 20 ); //syntax for buy //signal
AlertIf( BuySignal, "SOUND C:\\Windows\\Media\\Ding.wav", "Trendlinebreak alert on "+FullName() , 1, 1+2, 10000 ); //Buy
AlertIf( SellSignal, "SOUND C:\\Windows\\Media\\Ding.wav", "Trendlinebreak alert on "+FullName() , 2, 1+2, 10000 ); //Sell
AlertIf( ShortSignal, "SOUND C:\\Windows\\Media\\Ding.wav", "Trendlinebreak alert on "+FullName() , 3, 1+2, 10000 ); //Short
AlertIf( Coversignal, "SOUND C:\\Windows\\Media\\Ding.wav", "Trendlinebreak alert on "+FullName() , 4, 1+2, 10000 ); //Cover
_SECTION_END();