BBandTop( ARRAY, periods = 15, width = 2 )
As explained, the third argument "width" is standard deviations using periods averaging range (ATR). So, the inbuilt BBandTop already incorporates the Volatility (in accordance to your definition). Would suggest you to play with 1st Argument - array and the 2nd Argument - period in order to formulate your desired goal.
It appears to me that you want to mix Historical Volatility and Bollinger Band. But these two are completely separate process of measuring Volatility (the rate of price fluctuations w.r.t. to historical time period).