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 new 52-week highs in the last 10 days?

in Scanning
I am trying to determine the scan for any stocks that have hit new 52 week highs in the last 10 days. Does anyone have something like this? Below is what i have and it is not working. Any input is greatly appreciated. thanks!
[type = stock]
and [Close > 3]
and [Close < 1000]
and [Volume > 400,000]
and [country is US]
and [today's high > yesterday's daily max(253,high)]
Or [yesterday's high > 2 days ago daily max(253,high)]
!! works to this point; below here it syntax is right, results are off
or [2 days ago daily high > 3 days ago daily max(253,high)]
or [3 days ago daily high > 4 days ago daily max(253,high)]
or [4 days ago daily high > 5 days ago daily max(253,high)]
or [5 days ago daily high > 6 days ago daily max(253,high)]
[type = stock]
and [Close > 3]
and [Close < 1000]
and [Volume > 400,000]
and [country is US]
and [today's high > yesterday's daily max(253,high)]
Or [yesterday's high > 2 days ago daily max(253,high)]
!! works to this point; below here it syntax is right, results are off
or [2 days ago daily high > 3 days ago daily max(253,high)]
or [3 days ago daily high > 4 days ago daily max(253,high)]
or [4 days ago daily high > 5 days ago daily max(253,high)]
or [5 days ago daily high > 6 days ago daily max(253,high)]
0
Comments
-
You need to have a pair of brackets around your "or" conditions to treat them as one statement.
...
and [country is US]
and
[
[today's high > yesterday's daily max(253,high)]
or [yesterday's high > 2 days ago daily max(253,high)]
or [2 days ago daily high > 3 days ago daily max(253,high)]
or [3 days ago daily high > 4 days ago daily max(253,high)]
or [4 days ago daily high > 5 days ago daily max(253,high)]
or [5 days ago daily high > 6 days ago daily max(253,high)]
]
Also, while your approach of comparing successive highs should work, you could do it with just an "=" operator:
and
[
[high = max(253, high)]
or [1 day ago high = 1day ago max(253, high)]
or [2 days ago high = 2 days ago max(253, high)]
or etc.
]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