Easy Booby... you just need to post once!

--- In [email protected], "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).
> 
> Code: (BUY 5MA crossover 20MA and vice versa)
> 
> **********************************************************
> _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("Volume");
> Plot( Volume, _DEFAULT_NAME(), ParamColor("Color", colorBlueGrey ), 
> ParamStyle(
> "Style", styleHistogram | styleOwnScale | styleThick, maskHistogram ), 2 );
> _SECTION_END();
> 
> _SECTION_BEGIN("MA");
> P = ParamField("Price field",-1);
> Periods = Param("Periods", 15, 2, 300, 1, 10 );
> Plot( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ),
> ParamStyle("Style") );
> _SECTION_END();
> 
> _SECTION_BEGIN("MA1");
> P = ParamField("Price field",-1);
> Periods = Param("Periods", 15, 2, 300, 1, 10 );
> Plot( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ),
> ParamStyle("Style") );
> _SECTION_END();
> 
> _SECTION_BEGIN("MA2");
> P = ParamField("Price field",-1);
> Periods = Param("Periods", 15, 2, 300, 1, 10 );
> Plot( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ),
> ParamStyle("Style") );
> _SECTION_END();
> 
> 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);
> 
> shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
> PlotShapes( shape, IIf( Buy, colorGreen, colorRed ), 0, IIf( Buy, Low, High ) 
> );
> 
> Buy = ExRem( Buy, Sell );
> Sell = ExRem( Sell, Buy );
> 
> Cover = Buy;
> Short = Sell;
> 
> AlertIf( Buy, "SOUND C:\\Program Files\\AmiBroker\\Formulas\\ARB Main
> Indicators\\chimes.wav", "Buy", 2 );
> AlertIf( Sell, "SOUND C:\\Program Files\\AmiBroker\\Formulas\\ARB Main
> Indicators\\siren.wav", "Sell", 2 );
> *********************************************************
> 
> Awaiting reply.
> 
> warm regards...Bobby
>


Reply via email to