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.
How to scan for bollinger band and standard deviation breakouts
1)How would I scan for all stocks that broke the upper bollinger band or lower bollinger band?
2)How would I scan for all stocks that closed above/below 3 standard deviations of the price moment?
I wrote some simple scans, but I am not sure what keywords to use for above.
I am using following reference material for supported keywords. Is there a complete documentation on ALL supported keywords (for example, following link doesnt refer to keyword "uptrend", but this keyword is supported)
http://stockcharts.com/docs/doku.php?id=scans:advanced_scan_syntax
Thank you
2)How would I scan for all stocks that closed above/below 3 standard deviations of the price moment?
I wrote some simple scans, but I am not sure what keywords to use for above.
I am using following reference material for supported keywords. Is there a complete documentation on ALL supported keywords (for example, following link doesnt refer to keyword "uptrend", but this keyword is supported)
http://stockcharts.com/docs/doku.php?id=scans:advanced_scan_syntax
Thank you
0
Best Answer
-
You can just do one scan, since the second parameter for Bollinger Bands is the number of standard deviations. The first is the number of days you want to look at to calculate the standard deviation. So on the chart, BB(20,2) would draw the upper and lower bands derived from two standard deviations for the last 20 day's price action. Change the 2 to 3 to get 3 standard deviations.
To write the scan, use the "Technical Indicators" drop down on the advanced scan page. This gives you all available grammatically correct keywords. Select Upper BB, click insert, and modify the parameters.
You want a breakout, so use the "cross above" operator "x". So close crosses above upper BB.
For the lower BB, same thing, except the lower BB "crosses above" the close (not intuitive, but it's right if you think about it). I would do this in a separate scan to keep things simple. If you do both in one scan, you have to mess around with the "or" operator and group your conditions correctly with extra brackets. Leave that for later.
Probably you should also think about limiting "all stocks" to some subset of all stocks. Otherwise you get hundreds of hits most days. You could use predefined groups (see the Sectors and Industries dropdown on the advanced scan page), or some other criteria, like close > 20 and close < 50, or market cap > 10000 or whatever. Check out the "Ticker Properties" and "Price, Volume and SCTRs" drop downs to pick and choose.
As for "uptrend", you have to define this for your self. It's probably better that way because you have alot of flexibility. For instance, depending on your time frame, you could test for sma(200,close) > 21 days ago sma(200,close) i.e. a rising long term simple moving average is moving up. Maybe you might also want to test for a close above the 200MA. If you only care about the 50 or 10 day MA, change the test for rising averages accordingly, as you see fit.
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