MABI H-B HHV LLV
MABI H-B HHV LLV AFL, leveraging amibroker data feed, identifies market swings by analyzing high and low values. With real-time data feeds, it precisely pinpoints the highest high and lowest low values within a specified period, aiding traders in comprehending price volatility and potential trend reversals.
/ /////////////////////// //_SECTION_BEGIN("MABIUTS-H"); SetChartOptions(0,chartShowArrows|chartShowDates); _N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) )); p1=15;p2=15; X=EMA(C,p1);Y=EMA(X,p2); D=X-Y; BBT=BBandTop(D,5,1);BBB=BBandBot(D,5,1); Buy=Cross(D,BBB) AND abs((D-BBB)/BBB)>=0.01; Sell=Cross(BBT,D)AND abs((BBT-D)/D)>=0.01; Short=Cross(BBT,D)AND abs((BBT-D)/D)>=0.01; Cover=Cross(D,BBB) AND abs((D-BBB)/BBB)>=0.01; Bprice=IIf(Buy,Ref(O,1),0); //Buying Price Sprice=IIf(Sell,Ref(O,1),0); //Selling Price MYcolor = IIf( EMA(C,13)>EMA(EMA(C,9),3) AND C>Peak(C,2,1), colorAqua, IIf(EMA(C,13)>EMA(EMA(C,13),9) AND CRef( LastHigh, -1 ); //Sell = Cross( LongMA, ShortMA ); SetFormulaName(""); SetTradeDelays(1, 1, 1, 1); PositionScore =100/Close; PositionSize = - 20; // 20% of Portfolio ///////////////////////// _SECTION_BEGIN("Bollinger Bands"); P = ParamField("Price field",-1); Periods = Param("Periods", 15, 2, 100, 1 ); Width = Param("Width", 2, 0, 10, 0.05 ); Color = ParamColor("Color", colorCycle ); Style = ParamStyle("Style"); Plot( BBandTop( P, Periods, Width ), "BBTop" + _PARAM_VALUES(), Color, Style ); Plot( BBandBot( P, Periods, Width ), "BBBot" + _PARAM_VALUES(), Color, Style ); _SECTION_END();