how to calculate BollingerBandWidth ?
Forums › ProRealTime English forum › ProScreener support › how to calculate BollingerBandWidth ?
- This topic has 4 replies, 3 voices, and was last updated 2 years ago by
ZeroCafeine.
Tagged: Bollinger, bollinger bandwidth
-
-
11/28/2022 at 5:18 PM #204961
Hi everyone,
someone can tell me how this variable “BollingerBandWidth” is calculated please, because I don’t find the same result with a manual calculation, maybe it’s not the same standard deviations or something is missing, I get A different of D ?
12345678A = BollingerBandWidth[20](Close)BBUp = BollingerUp[20]BBDown = BollingerDown[20]D = BBUp - BBDownReturn A, DBest Reguards
11/28/2022 at 5:25 PM #204964There you go:
12345678910//// Bollinger BB%//DEFPARAM CalculateOnLastBars = 1000p = 20dev = 2.0BollInf = Average[p,0](close) - (dev * std[p](close))BollSup = Average[p,0](close) + (dev * std[p](close))pB = ((close - BollInf) / (BollSup - BollInf)) * 100return pB AS "Boll BB %",80 AS "Ob",20 AS "Os"11/29/2022 at 9:13 AM #204988Bollinger B% is not the same as Bollinger BandWidth, as per our documentation: https://www.prorealcode.com/documentation/bollingerbandwidth/
Calculation :
Indicator = ((Boll+) – (Boll-)) / moving average
Bollinger Bandwidth comparison between instruction and custom code1234a = BollingerBandWidth[20](close)b = (BollingerUp[20](close)-BollingerDown[20](close))/average[20]return a , b1 user thanked author for this post.
11/29/2022 at 11:42 AM #20500912/05/2022 at 1:21 PM #205276tks you all,
so when I red the fonction’s name of : “BollingerBandWidth” I understood it’s the difference betwen the 2 bollinger band like : BB Up – BB Down, but this is not the case,
tks again,
Best Reguards -
AuthorPosts