--- In amibroker@yahoogroups.com, "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, I 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.

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);

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);


Reply via email to