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.
Scanning for first time 52 week highs
Hi,
Is there a way to scan for 1st time 52 week highs. The current scan I come up with has stocks with a 52 week high, but for example the day before was also a 52 week high. I am interested in only ones that make a brand new one in the past 52 weeks.
Thanks.
0
Comments
Usually we think of the last 52 week high being 52 weeks ago, but if the trend is up, it might have been the day before, or a week or a month or two months ago - some period less than 52 weeks ago.
If the stock has been in a down trend, the 52 week high can really be 52 weeks ago. But, as an aside, it is not necessarily a high in the sense of being a peak price. As time passes, the peak price is no longer in the time frame, so the high keeps falling to the lower highs in the decline after the peak until it hits a lower peak. Again, the Price Channel on the chart will show this.
When you write the scan, you have to decide where you want to pick up the 52 week high - in other words, how long to do you want it to be since the last time there was a 52 week high.
So, if you want to pick up the first new high in a year (which is the situation you want - the stock has been falling, but has recovered to the highest price in 52 weeks):
and [1 day ago Upper Price Chan(251) = min( 251, Upper Price Chan(251))]
and [ high x 1 day ago Upper Price Chan(251)]
If it doesn't have to be the very first crossing (which sometimes is better if the first time there was a lot of selling), then you can make the Upper Price Channel equal to itself some number of days ago, say, a month (meaning the Channel has been flat, meaning price has been under it for at least 21 days):
and [1 day ago Upper Price Chan(251) = 21 days ago Upper Price Chan(251)]
and [ high x 1 day ago Upper Price Chan(251)]
You will have to play around with the parameter a little (21 days) to see what you get for results. Keep in mind that not all new highs, especially first new highs, are breakouts signalling more higher prices to come. They can be tops again, at least for a while.
Note: Price Channels are "off by one" - they don't include the current bar. So in some cases it appears that the scan picks up the second bar to cross the Price Channel. Here's the Chart School explanation:
The Price Channel formula does not include the most recent period. Price Channels are based on prices prior to the current period. A 20-day Price Channel for October 21 would be based on the 20-day high and 20-day low ending the day before, October 20. A channel break would not be possible if the most recent period was used.