hi,

pl. help me in this afl.i need when bb cross top or bottom give me alert in 
alertoutput box what changes need in this afl? 

_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("Bollinger Bands");
P = ParamField("Price field",-1);
Periods = Param("Periods", 20, 2, 100, 1 );
Width = Param("Width", 2, 0, 10, 0.05 );
Color = ParamColor("Color", colorCycle );
Style = ParamStyle("Style");
MAG=( BBandTop( P, Periods, Width )); 
RAG=( BBandBot( P, Periods, Width )); 
_SECTION_END();

Buy = Cross( MAG,L);
Sell = Cross(H,RAG);
Filter = 1; 
AlertIf(Buy,"",WriteVal(Buy,1.4),1,1,0);
AlertIf(Sell,"",WriteVal(Buy,1.4),1,1,0);


thx in advance

Reply via email to