--- In amibroker@yahoogroups.com <../../../../post?postID=tZS8P7EA9OVTrt5y32-kyiN7i6wuKNGiYOztue0QWMCWCTN\ nv_Vn_eyk-Yp6ywBujjYTfRtp-fBaFvSfcKPd> , "Bobby R" <bobby6...@...> wrote: > > Hello, > > Can someone please help me with the following scrip. I have a problem, wherein thru' AA, with timeframe 5 min,when I scan, I get the scrips in the Alert Outputwindow. But the scrip tab which is Open,gives multiple sound alert repeatedly. > Can someone help me to recode the same for : > 1) Give alarm only once whenever applicable. > 2) The AlertOutput window gives a Down RED Color arrow even if it is a BUY signal, whereas I'm looking for a GREEN Up arrow (All this is in the scripname side).
> Awaiting reply. > > warm regards...Bobby Bobby, the EXREM function alters the AlertIf output so I blocked it and also added the correct "type" & "flags" for the AlertIf function. That is 1 = Buy, 2 = Sell, 3 = Short, 4 = Cover. The 4+8 flags stops repetition. Look up the function for a better explanation. I also added an alert for the Short and Cover while you can add a different SOUND for them. UpCdl=Open > Close; DnCdl=Close > Open; Buy = (Cross(MA(Close, 5),MA(Close, 20))) AND UpCdl; Sell = (Cross(MA(Close, 13),MA(Close, 5))) AND DnCdl; Short = Sell; Cover = Buy; //Buy = ExRem(Buy, Sell); //Sell = ExRem(Sell, Buy); //Buy = ExRem(Short, Cover); //Sell = ExRem(Cover, Short); shape = Buy * shapeUpArrow + Sell * shapeDownArrow; PlotShapes(shape, IIf(Buy, colorGreen, colorRed), 0, IIf(Buy, Low, High)); AlertIf( Buy, "SOUND C:\\Program Files\\AmiBroker\\Formulas\\ARB Main Indicators\\chimes.wav", "Buy", 1, 4+8); AlertIf( Sell, "SOUND C:\\Program Files\\AmiBroker\\Formulas\\ARB Main Indicators\\siren.wav", "Sell", 2, 4+8); //AlertIf( Short, "SOUND C:\\Program Files\\AmiBroker\\Formulas\\ARB Main Indicators\\siren.wav", "Short", 3, 4+8); //AlertIf( Cover, "SOUND C:\\Program Files\\AmiBroker\\Formulas\\ARB Main Indicators\\chimes.wav", "Cover", 4, 4+8);