Want to add sound alert in this afl

#1
DEAR ALLS

can someone add sound alert in this afl

and this is not working for sell signal in back test also ractify the problem

thanks

AlertIf( Buy, "SOUND C:\\Windows\\Media\\Ringin.wav",
AlertIf( Sell, "SOUND C:\\Windows\\Media\\Ringin.wav",










_SECTION_BEGIN("RSI");
TimeFrameSet(in15Minute);
a15 = EMA(RSI(5),21);
bbtop15 = BBandTop(a15,5,0.5);
bbbot15 = BBandBot(a15,5,0.5);
Col15 = IIf(a15 > bbtop15,colorBrightGreen,IIf(a15 < bbbot15,colorRed,colorDarkGrey));
TimeFrameRestore();

SetChartBkColor( colorBlack ) ;
A1=EMA(RSI(5),21);
BBtop=BBandTop(A1,5,.5);
BBbot=BBandBot(A1,5,.5);
Color=IIf(a1>Ref(a1,-1), colorGreen,colorRed);
Plot(a1,"RSI",color,styleLine);
Plot(BBtop,"BBtop",colorBrightGreen,styleDashed,styleThick);
Plot(BBbot,"BBbot",colorCustom12,styleDashed);
Plot(50,"",Col15,styleThick);
Plot(70,"",Col15,styleThick);
Plot(30,"",Col15,styleThick);

Buy = a1 > bbtop;
Sell = a1 < bbbot;
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);

PlotShapes(Buy*shapeHollowSmallUpTriangle,colorYellow);
PlotShapes(Sell*shapeHollowSmallDownTriangle,colorYellow);
Title =
WriteIf(H > Ref(H,-1),EncodeColor(colorGreen),EncodeColor(colorRed))+"ex " + Ref(H,-1)+" Hi = " +H+
WriteIf(C > O,EncodeColor(colorBrightGreen),EncodeColor(colorRed))+"\nOp "+O+ "Cl = "+C+
WriteIf(L < Ref(L ,-1), EncodeColor(colorRed),EncodeColor(colorGreen))+"\nex "+Ref(L,-1)+"Lo = "+L
;
Plot( EMA( a1, 9 ), "", colorWhite, styleThick );
_SECTION_END();
 
#2
DEAR ALLS

can someone add sound alert in this afl

and this is not working for sell signal in back test also ractify the problem

thanks

AlertIf( Buy, "SOUND C:\\Windows\\Media\\Ringin.wav",
AlertIf( Sell, "SOUND C:\\Windows\\Media\\Ringin.wav",










_SECTION_BEGIN("RSI");
TimeFrameSet(in15Minute);
a15 = EMA(RSI(5),21);
bbtop15 = BBandTop(a15,5,0.5);
bbbot15 = BBandBot(a15,5,0.5);
Col15 = IIf(a15 > bbtop15,colorBrightGreen,IIf(a15 < bbbot15,colorRed,colorDarkGrey));
TimeFrameRestore();

SetChartBkColor( colorBlack ) ;
A1=EMA(RSI(5),21);
BBtop=BBandTop(A1,5,.5);
BBbot=BBandBot(A1,5,.5);
Color=IIf(a1>Ref(a1,-1), colorGreen,colorRed);
Plot(a1,"RSI",color,styleLine);
Plot(BBtop,"BBtop",colorBrightGreen,styleDashed,styleThick);
Plot(BBbot,"BBbot",colorCustom12,styleDashed);
Plot(50,"",Col15,styleThick);
Plot(70,"",Col15,styleThick);
Plot(30,"",Col15,styleThick);

Buy = a1 > bbtop;
Sell = a1 < bbbot;
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
AlertIf( Buy, "", "BUY @ " + C, 1 );
AlertIf( Sell, "", "SELL @ " + C, 2 );

PlotShapes(Buy*shapeHollowSmallUpTriangle,colorYellow);
PlotShapes(Sell*shapeHollowSmallDownTriangle,colorYellow);
Title =
WriteIf(H > Ref(H,-1),EncodeColor(colorGreen),EncodeColor(colorRed))+"ex " + Ref(H,-1)+" Hi = " +H+
WriteIf(C > O,EncodeColor(colorBrightGreen),EncodeColor(colorRed))+"\nOp "+O+ "Cl = "+C+
WriteIf(L < Ref(L ,-1), EncodeColor(colorRed),EncodeColor(colorGreen))+"\nex "+Ref(L,-1)+"Lo = "+L
;
Plot( EMA( a1, 9 ), "", colorWhite, styleThick );
_SECTION_END();
/////////////////////////////////////////////////////////////////////
_SECTION_BEGIN("RSI");
TimeFrameSet(in15Minute);
a15 = EMA(RSI(5),21);
bbtop15 = BBandTop(a15,5,0.5);
bbbot15 = BBandBot(a15,5,0.5);
Col15 = IIf(a15 > bbtop15,colorBrightGreen,IIf(a15 < bbbot15,colorRed,colorDarkGrey));
TimeFrameRestore();

SetChartBkColor( colorBlack ) ;
A1=EMA(RSI(5),21);
BBtop=BBandTop(A1,5,.5);
BBbot=BBandBot(A1,5,.5);
Color=IIf(a1>Ref(a1,-1), colorGreen,colorRed);
Plot(a1,"RSI",color,styleLine);
Plot(BBtop,"BBtop",colorBrightGreen,styleDashed,styleThick);
Plot(BBbot,"BBbot",colorCustom12,styleDashed);
Plot(50,"",Col15,styleThick);
Plot(70,"",Col15,styleThick);
Plot(30,"",Col15,styleThick);

Buy = a1 > bbtop;
Sell = a1 < bbbot;
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
AlertIf( Buy, "", "BUY @ " + C, 1 );
AlertIf( Sell, "", "SELL @ " + C, 2 );


PlotShapes(Buy*shapeHollowSmallUpTriangle,colorYellow);
PlotShapes(Sell*shapeHollowSmallDownTriangle,colorYellow);
Title =
WriteIf(H > Ref(H,-1),EncodeColor(colorGreen),EncodeColor(colorRed))+"ex " + Ref(H,-1)+" Hi = " +H+
WriteIf(C > O,EncodeColor(colorBrightGreen),EncodeColor(colorRed))+"\nOp "+O+ "Cl = "+C+
WriteIf(L < Ref(L ,-1), EncodeColor(colorRed),EncodeColor(colorGreen))+"\nex "+Ref(L,-1)+"Lo = "+L
;
Plot( EMA( a1, 9 ), "", colorWhite, styleThick );
_SECTION_END();[/QUOTE]


/////////////////////////////////////////////////////////////////////
 
#3
HI Friends,

I want one afl i not use any indicator for buy or sell if i buy my trg is 100 points and stoploss is 50 to 60 points every call in bank nifty.

if i buy and draw two horizontal line on price chart one is target line and second is stop loss line so can i add sound alert if price go above target line or below stop line if yes so pls give me afl for same.

Thanks
 

Similar threads