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.
Range expansion
I have know clue where to begin writing a range expansion scan, any help would be much appreciated.
looking for scam to find:
Today’s range must be equal to or greater than the larges range in the last 9 days.
as this does not seem to work:
and [Range > 1 day ago Max (9, Range)]
Thank you in advance.
Isabel
0
Comments
-
The scan itself seems to work - that is, it runs and it gets what it asks for. But you probably have to add conditions to capture a range expansion situation - by which I assume you mean, a strong reversal of trend.
So, for a bullish reversal, a simple way might be to test for a close up today and a falling sma of some length - so maybe sma10 less than 10 days ago sma10. For a bearish reversal you would test for the opposite - close down, higher sma vs the recent past.0 -
I typed Range into the Search box at the top and found a couple of links that may assist you.
https://scan.stockcharts.com/discussion/comment/5898#Comment_5898
https://scan.stockcharts.com/discussion/comment/5823#Comment_5823
https://scan.stockcharts.com/discussion/1958/wide-range-bar-off-20-sma/p1
I see that your scan code passes syntax and actually returns results that meet the requirement you said. If you want them to be "rising" sequentially, perhaps you can add the Streak Up or Count Up function to the scan.
The Streak function looks for Consecutive periods. In this example, 8 consecutive Up closes.
and [Streak Up(close) > 8]
The Count function looks for a fraction. In this example, 8 Up closes out of 10 periods.
and [Count Up(10, close) > 8]
0 -
the Streak and Count function are very helpful, Thank you!
0 -
my syntax was incorrect. I had greater than and it should have been greater than or equal to to match the descriptions. Corrected below.
The Streak function looks for Consecutive periods. In this example, 8 consecutive Up closes.
and [Streak Up(close) >= 8]
The Count function looks for a fraction. In this example, 8 Up closes out of 10 periods.
and [Count Up(10, close) >= 8]
Sorry about that.
You can even use the Count Up, or down, in the Rank By statement of a scan. It's neat.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