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.
scan for ranges
Comments
-
like a bollinger band squeeze?0
-
B Bands are a good way to do it.
Another way might be Price Channels. Choose a channel length, a per cent difference ( e.g. upper - lower divided by lower less than, say, 1 per cent) and today's upper = x days ago upper and today's lower = x days ago lower - where the x is less than the length of the channel - so maybe 15 days ago for a 20 day channel.
You would have to play around with it quite a bit to get what you like. Run it for dates in the past to see what happens after the scan conditions are met.0 -
thanks markd i like the idea of price channels, where can i find the literature which will teach me to create the code?0
-
so i can take a stab at it0
-
Chart School has a page on Technical Indicators and Overlays with links to each one. The Price Channel page (one of the Overlay links) has sample code you can adapt:
https://school.stockcharts.com/doku.php?id=technical_indicators:price_channels0 -
Ok so to create a channel
[Upper Price Chan(20) > close]
[Lower Price Chan(20) < close]
This formulation says that price for the last 20 days is in between a range, right?
0 -
I added the "and"
and [Upper Price Chan(20) > close]
and [Lower Price Chan(20) < close]
Is that correct, that just catches any 20day range?0 -
Once, i know that's correct then i want to add some info so i filter for x% ranges, i.e. a 10% range
then i want to add another statement which says that price is close to the bottom of the range, or price is close to the top of the range.....is that possible using a stochastic statement?
0 -
The close is almost always between the Upper and Lower Channels, so you don't have to specify that's where the close is (the exception would be if it closes at the bar's high or low and the high or low is equal to the channel).
To test for the width of the range, you have to compare the difference between the upper and lower channels
(Upper Price Chan(20) - Lower Price Chan(20)) to the Lower Price Chan value - so -
and [Upper Price Chan(20) - Lower Price Chan(20) < Lower Price Chan(20) * .1]
To locate the current close in the price channel, you can use Fast Stochastics. For instance, to find closes below the middle of the channel
and [Fast Stoch %K(20,1) < 50]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