luminaryfi

Z-Score 'Bollinger Bands'

luminaryfi Updated   
The following script is an application of the Z-Score (previous script).

Z-Scores can be used in place of standard deviation (sigma) in 'Bollinger Bands'.


The average of the sample (x-bar) over 21 days (N)
21 average trading days per month, fixed value

The average of the population (mu) over 63 days (n)
63 days per quarter, default is set to 63

Z-Score is calculated by formula in previous script, and the absolute value is taken of "Z".

Z-High = absolute value of Z + (x-bar).
Z-Low = absolute value of Z - (x-bar).

Will update with Z from mu and Z from avg (working on UX and visualization details).
Release Notes:
added display options.

can choose from:

Z-Score from sample mean (x-bar)
Z-Score from population mean (mu)
Release Notes:
//hexidecimal color switch
Release Notes:
//test
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?