Return the “Bollinger Band Width” technical indicator value.
The Bollinger band width is calculated by making the difference of the upper and lower band of the original Bollinger Band indicator. High volatility means high value of the indicator.
Syntax:
1 |
BollingerBandWidth[N](price) |
Calculation :
Indicator = ((Boll+) – (Boll-)) / moving average
This indicator is calculated with the bollinger bands. It helps indicate if the market is in a strong trend or not.
If the indicator rises, the market forms a trend and if the indicator declines, the trend is almost over.
In a market without trend, you can refer to the Bollinger Bands. You can use the lower band as a support and the upper band as a resistance.
Example:
1 2 3 4 |
BBwidth = BollingerBandWidth[20](close) BBwidthSlow = BollingerBandWidth[30](close) RETURN BBwidth coloured(0,100,100), BBwidthSlow AS "more laggy BandWidth" |
Hello, how can I put top band with maximums of 125 periods and low band with minimums of 125 periods?Thank you
Luis
Just change the bollinger band periods under brackets:
BBwidth = BollingerBandWidth[125](close)
Thank you for answering me.I did not explain well. The configuration that I want is 20,2But I want to draw in the indicator a horizontal top line that marks me where the top range is of bankwidth of the last 125 periods and another horizontal low line that moves and adapts that it say to me where the minimum is of bandwith of the last 125 periods.Thank you
Luis
Thanks for explanation, I now understand 🙂 You want to draw the highest high and the lowest low over the last 125 periods of the bollinger bandwidth:
hh = highest[125](BBwidth)
ll = lowest [125](BBwidth)
Yes, thank you very much.
Excuse me so many question.
The code would be like so?
In RETURN, I do not know introduce hh and ll
BBwidth = BollingerBandWidth[20](close)BBwidthSlow = BollingerBandWidth[2](close)hh = highest[125](BBwidth)ll = lowest [125](BBwidth)
RETURN BBwidth coloured(0,100,100), BBwidthSlow AS “more laggy BandWidth”
The RETURN statement will now look like:
RETURN BBwidth coloured(0,100,100), BBwidthSlow AS “more laggy BandWidth”, hh, ll
thank you very much
greetings
Luis Enrique
Hello Nicolas
I’m looking to use bollinger band and i didn’t find the real code just :
myBoll, myBoll1 = CALL “Exemple Bollinger”[1.8, 130]
and i have a message : don’t use the Call function …
where i can find de original function like in PRT ?
Hello Nicolas
and i would like to find the original BB with Exponential function like the orginal on PRT
thanks for your contribution
https://www.prorealcode.com/documentation/bollingerup/
https://www.prorealcode.com/documentation/bollingerdown/
Thanks Nicolas