Bollinger Bands Trend Indicator

Somebody please help in making a coding an indicator for the below

lower = abs(lowerBB(20) - lowerBB(50))
upper = abs(upperBB(20) - upperBB(50))
BBTrend = (lower - upper) / middleBB(20)

lower = abs(BBandBot(C, 20) - BBandBot(C, 50));
upper = abs(BBandTop(C, 20) - BBandTop(C, 50));
BBTrend = (lower - upper) / Ma(C,20);
3 Likes