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 Max(Date,Close)
Is there a way to scan for the highest close since a certain date rather than over a time span?
0
Comments
Assuming you are in a daily time frame, you can get that number from the calendar widget above the scan criteria window on the advanced scan page (Starting ... days before..). But you have to get it each time you run the scan and substitute that number into you scan.
Sometimes if it came from below to consolidation, I may be able to extend the range long enough for Max(xx,Close) to be useful for an expected breakout.
Thanks,
cactus
Example:
This looks for a breakout above the 63 day (quarterly) price channel after it has been flat for at least two weeks, or it has dropped after a flat period. You could experiment with other time periods as well.
// your list or criteria
...
// close crosses above yesterday's UPC 63
and [close x Upper Price Chan(63)]
and
[
// UPC 63 has been flat for at least ten days
[1 day ago Upper Price Chan(63) = 10 days ago Upper Price Chan(63)]
or
// UPC 63 dropped in last 10 days
[1 day ago Upper Price Chan(63) < 10 days ago Upper Price Chan(63)]
]
It's unusual for price to close above the UPC 63 if the channel has been falling, so the second line is meant to catch those instances where the breakout happens after the channel has been flat for a while, then drops just before the breakout.
Like any scan, not every hit is what you are looking for, and it may not catch every situation you would count as a hit if you could see every chart.
I read your recent reply to KevinB regarding ROC(1). I've been doing a lot of my scans with what you refer to as brute force. ROC(1) is going to make my life easier. Using it may lead to other ideas of how to use it (or not). Thanks.
It turns out that the stock I was interested in included a high within the the consolidation that was higher than anything for at least a year before the consolidation, so max high going back a few months before the consolidation works fine.