Yesterday's close within 2% of 52 week high, but no new 52 week high in the last 90 days
I am trying to write a scan that will return all stocks that are within 2% of their 52 week high, but which have not had a new 52 week high in the last 90 days.
It is probably simple, but I a stuck.
I have:
[ [type = stock] and [country = US] ] and
[
[high > 1 day ago max(253,high) * .98] and // Price is greater than 98 of the 52 week high
[high < 1 day ago max(253,high)] and // but is less that the 52 week high
[1 day ago max(90,high) < 1 day ago max(253, high)] // and the hasn't made a new high in 90 days.
]
I am getting stocks that are making daily new highs.
It is probably simple, but I a stuck.
I have:
[ [type = stock] and [country = US] ] and
[
[high > 1 day ago max(253,high) * .98] and // Price is greater than 98 of the 52 week high
[high < 1 day ago max(253,high)] and // but is less that the 52 week high
[1 day ago max(90,high) < 1 day ago max(253, high)] // and the hasn't made a new high in 90 days.
]
I am getting stocks that are making daily new highs.
0
Comments
-
Try line 2: [ high>(1 day ago max(253,high) *.98)]
0 -
This doesn't produce any charts with a new 253 high (that I could find):
and [max(90,high) < max(253, high)] // hasn't made a high above today's max 253 high for 90 days
and [high > max(253,high) * .98] // but today's high is within 2 % of today's max 253 high
If you don't want today's high to be a new high, you can include today in the max( ). That way, the first statement should guarantee that you don't get a new 253 high.
0 -
My apologies for the delayed response. Busy busy. Thanks Markd! This works perfectly.0
Categories
- All Categories
- 2.4K StockCharts
- 397 SharpCharts
- 146 Other Charting Tools
- 69 Saved Charts and ChartLists
- 1.5K Scanning
- 74 Data Issues
- 177 Other StockCharts Questions
- 224 Technical Analysis
- 155 Using Technical Analysis
- 6 InterMarket and International
- 19 Market and Breadth Indicators
- 44 Market Analysis
- 109 Trading
- 109 Trading Strategies
- 162 S.C.A.N the StockCharts Answer Network forum
- 64 Using this StockCharts Answer Network forum
- 98 s.c.a.n. archives
- 7 Off-Topic
- 7 The Cogitation & Rumination Emporium
- Forum Test Area
