// Downloaded From https://www.WiseStockTrader.com P = ParamField("Price"); Type = ParamList("Type", "Simple,Exponential,Double Exponential,Tripple Exponential,Wilders,Weighted,Len Reg,Time Shift,AMA,Median"); Periods = Param( "period ", 15, 1, 500, 1 ); Width = Param("Width", 1.6185, 0, 10, 0.0001 ); s = Param("shift", 0, -10, 10, 1 ); Var = Param("AMA var", 0.03, 0, 10, 0.001 ); m = 0; if( Type == "Simple" ) m = MA( P, Periods ); if( Type == "Exponential" ) m = EMA( P, Periods ); if( Type == "Double Exponential" ) m = DEMA( P, Periods ); if( Type == "Tripple Exponential" ) m = TEMA( P, Periods ); if( Type == "Wilders" ) m = Wilders( P, Periods ); if( Type == "Weighted" ) m = WMA( P, Periods ); if( Type == "Len Reg" ) m = LinearReg( P, Periods ); if( Type == "Time Shift" ) m = TSF( P, Periods ); if( Type == "AMA" ) m = AMA( P, Var ); if( Type == "Median" ) m = Median(P,Periods ); bbtop= m + Width * StDev(P,Periods ); bbbot= m - Width * StDev(P,Periods ); Color = ParamColor("Color", colorYellow ); Style = ParamStyle("Style",styleDashed); Plot( bbtop, "\nBBTop("+Type+" , "+Periods +" , "+Width +")", Color, Style ,0,0,s); Plot( bbbot, "\nBBBot("+Type+" , "+Periods +" , "+Width +")", Color, Style ,0,0,s);