Hi
I am having a problem creating a Bollinger%b for an indicator i want to use. i have the formula as listed by prorealtime %b = (close – lower Band)/(upperband – lowerband).
he problem i am having is that he built in indicator does exactly waht i need it to do but i dont want to use the “call” function. The default has a few things in it that are not part of the listed formula. it seems to have some form of Standard Deviation as well as a selection of diferant methods.
Does anyone have the code that will replicate the prorealtime indicator exactly.
included a pic of the kind of thin I am looking for
If it can be useful to you, I use this that I have written.
//Bollinger %B
lengthBol = 20
multiplier = 2
avg = average [lengthBol] (close)
stDev = std [lengthBol] (close)
percBolH = avg + multiplier * stDev
percBolL = avg - multiplier* stDev
percB = (close - percBolL) / (percBolH-percBolL)*100
overbought = 80
oversold = 20
RETURN percB as"%B", overbought, oversold