New Members: Be sure to confirm your email address by clicking on the link that was sent to your email inbox. You will not be able to post messages until you click that link.
Bollinger Bands

in Scanning
I have a Bollinger Band where the middle period is set at 20..the upper standard deviation is + .382 and the lower is -.382...would like to scan stocks that close above the upper band 5 bars and 5 bars that close below the lower band..Help..greatly appreciated.
0
Comments
-
My email: dannymango@yahoo.com0
-
If you want every bar above the band, you have to have a condition for each day. Assuming you want exactly 5 closes above the BB, it would be 6 days ago close < 6 days ago Upper BB, and 5 days ago close > 5 days ago Upper BB, and 4 days ago close > 4 days ago Upper BB, etc. Reverse for close below the Lower BB.0
-
Mark, how do I specify that I have +/- .382 on my standard deviation of my Bollinger Band?0
-
As far as I know, you cannot specify the value of the standard deviation. The value of the standard deviation is a result of a calculation of distances between the SMA and prices for each bar in the SMA (in other words, how far prices have wandered away from their moving average). Therefore, the standard deviation's value wiill change with each bar as price values are added and dropped (see the table in the chart school article).
You can specify how far away from the moving average you want the bands to be. The bands are placed at a multiple of the standard deviation value - the default multiplier is 2. That would place the upper band at the SMA plus 2x the standard deviation, and the lower band at the SMA minus 2x the standard deviation. But there is no reason you cannot use a fractional value to multiply the standard deviation, e.g. Upper BB(20, .382) and Lower BB(20, .382).0 -
Thanks Mark...got it working0
-
quoting Mark:
"As far as I know, you cannot specify the value of the standard deviation. The value of the standard deviation is a result of a calculation of distances between the SMA and prices for each bar in the SMA (in other words, how far prices have wandered away from their moving average). Therefore, the standard deviation's value wiill change with each bar as price values are added and dropped (see the table in the chart school article).
You can specify how far away from the moving average you want the bands to be. The bands are placed at a multiple of the standard deviation value - the default multiplier is 2. That would place the upper band at the SMA plus 2x the standard deviation, and the lower band at the SMA minus 2x the standard deviation. But there is no reason you cannot use a fractional value to multiply the standard deviation, e.g. Upper BB(20, .382) and Lower BB(20, .382). "
Thanks Mark, I was wondering the same thing as daniel and didn't realize the standard deviation was the result of a calculation of those distances. Thanks for shedding some light here0 -
To be more precise, it is a calculation *based on* those differences. Here are the steps:
Determine the number of values in the sample (i.e., the length of the moving average)
Add up the values
Divide the sum by the number of values to get the average
Subtract each value in the sample from the average
Square each difference (multiply each difference times itself , e.g. 4.1 x 4.1)
Add up all the squared values
Divide the sum of the squared values by the number of squared values to get the average of squared values
Find the square root of the average of the squared differences – that is the standard deviation.
0
Categories
- All Categories
- 2.3K StockCharts
- 395 SharpCharts
- 146 Other Charting Tools
- 69 Saved Charts and ChartLists
- 1.5K Scanning
- 73 Data Issues
- 177 Other StockCharts Questions
- 218 Technical Analysis
- 155 Using Technical Analysis
- 2 InterMarket and International
- 19 Market and Breadth Indicators
- 42 Market Analysis
- 109 Trading
- 109 Trading Strategies
- 163 S.C.A.N the StockCharts Answer Network forum
- 65 Using this StockCharts Answer Network forum
- 98 s.c.a.n. archives
- 5 Off-Topic
- 6 The Cogitation & Rumination Emporium
- Forum Test Area