If it's the Keltner bands, the ATRS is used for the distance. The code is then:
Code:
vars Price = series(price());
int Period = 5;
vars Trimavar = series(Trima(Price,Period));
var upper = Trimavar[0]+BandsDeviations*ATRS(Period);
var lower = Trimavar[0]-BandsDeviations*ATRS(Period);