var m3=TA.MA(records,3);
var m6=TA.MA(records,6);
var m12=TA.MA(records,12);
var m24=TA.MA(records,24);
var m1=TA.EMA(records,13);
var m3=TA.EMA(records,34);
var m5=TA.EMA(records,55);
var m120=TA.EMA(records,120);
bbi.push((m3[m3.length-1]+m6[m6.length-1]+m12[m12.length-1]+m24[m24.length-1])/4);
if(bbi.length<11){
return 0;}
var stdz=talib.STDDEV(bbi,m);
upr.push(bbi[bbi.length-1]+n*stdz[stdz.length-1]);
dwn.push(bbi[bbi.length-1]-n*stdz[stdz.length-1]);
if(upr.length<2){
return 0;}
if(upr.length>10){
upr.pop();
dwn.pop() ;
bbi.pop() ;
}