use this one. Previous one gives different values from orginal bb values. If i use "periods" param it gives different values. So i made a tiny change.
and again check before use pls.
////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////
//pra1968, traderji members request
//created by
https://twitter.com/ert_analiz. used amibroker's bb formula
P = ParamField("Price field",-1);
zaman = Param("zaman", 20, 2, 300, 1 );//used term "zaman" for "periods"
Width = Param("Width", 2, 0, 10, 0.05 );
Color = ParamColor("Color", colorCycle );
Style = ParamStyle("Style");
bbtop=BBandTop( p, zaman, 2 );
bbbot=BBandBot( p, zaman, 2 );
fark= bbtop-bbbot;
Plot( bbtop, "BBTop" + _PARAM_VALUES(), Color, Style );
Plot( bbbot, "BBBot" + _PARAM_VALUES(), Color, Style );
aranan =fark <= Ref(fark,-1);//(Todays BBandTop - Todays BBandBot) < = (Yesterdays BBandTop - Yesterdays BBandBot)
Filter=aranan;
AddColumn(fark,"fark",1.3);
AddColumn(Ref(fark,-1),"-1day",1.3);
AddColumn(Ref(fark,-2),"-2day",1.3);
AddColumn(Ref(fark,-3),"-3day",1.3);
AddColumn(Ref(fark,-4),"-4day",1.3);
AddColumn(Ref(fark,-5),"-5day",1.3);
///////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////