Hi,
I was trying to use Amibroker Say() as below. It triggers and says...but keeps on repeating till the trigger gets voided or candle changes or time frame changes. Please someone help to get this fixed, so that only onetime it says.
x = EMA(Close,5);
C1 = ParamColor("EMA5", colorTeal);
y = EMA(Close,13);
C2 = ParamColor("EMA13", colorRed);
Plot(x, "EMA(5)", C1, styleLine);
Plot(y, "EMA(13)", C2, styleLine);
Plot( C, "Close", ParamColor("Color", colorGreen ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
Buy=Cross(x,y);
Sell=Cross(y,x);
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
Short = Sell;
Cover = Buy;
Cover = ExRem(Cover,Short);
Short = ExRem(Short,Cover);
Filter = Cover OR Short;
AlertIf( Buy, "SOUND c:/alert.wav", "Audio alert",0,1+2+4+8);
AlertIf( Sell, "SOUND c:/alert.wav", "Audio alert",0,1+2+4+8);
if(LastValue(Buy)) Say(Name()+Interval(2)+"Buy");
if(LastValue(Sell)) Say(Name()+Interval(2)+"Sell");
PlotShapes(shapeUpArrow*Buy,colorBrightGreen);
PlotShapes(shapeDownArrow*Sell,colorLightOrange);
I was trying to use Amibroker Say() as below. It triggers and says...but keeps on repeating till the trigger gets voided or candle changes or time frame changes. Please someone help to get this fixed, so that only onetime it says.
x = EMA(Close,5);
C1 = ParamColor("EMA5", colorTeal);
y = EMA(Close,13);
C2 = ParamColor("EMA13", colorRed);
Plot(x, "EMA(5)", C1, styleLine);
Plot(y, "EMA(13)", C2, styleLine);
Plot( C, "Close", ParamColor("Color", colorGreen ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
Buy=Cross(x,y);
Sell=Cross(y,x);
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
Short = Sell;
Cover = Buy;
Cover = ExRem(Cover,Short);
Short = ExRem(Short,Cover);
Filter = Cover OR Short;
AlertIf( Buy, "SOUND c:/alert.wav", "Audio alert",0,1+2+4+8);
AlertIf( Sell, "SOUND c:/alert.wav", "Audio alert",0,1+2+4+8);
if(LastValue(Buy)) Say(Name()+Interval(2)+"Buy");
if(LastValue(Sell)) Say(Name()+Interval(2)+"Sell");
PlotShapes(shapeUpArrow*Buy,colorBrightGreen);
PlotShapes(shapeDownArrow*Sell,colorLightOrange);