#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

# 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?

• mod
No, you have to specify the offset from the current date.

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.
• edited December 2017
I was trying to figure a way to scan for a close say 1% above the highest close in a horizontal consolidation. I could scan against the current high in that range - but would have to periodically (sometimes frequently) change it each time that signal didn't pan out. It would be so nice if I didn't have to change that figure each time there was a whipsaw and a signal on a new higher close.
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
• mod
You could play around with price channels. Those key off the highs instead of the closes, but I don't think it makes too much difference. Channels do not always correspond to a peak high, but they seem to work pretty well even if they don't.

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.

...

// 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 generally make my decisions of what and when to trade mostly off the weekly charts (after a scan), and use price channels along the lines of Elder. My primary saved chart style includes a 22 week EMA with a 4% and an 8% price channel, and an 11 week EMA with a 2.5% price channel. When I am looking closely at a stock these percentages may have to be fine tuned to try to adjust toward infrequent penetrations. I pay close attention to these and they do sometimes consistently produce uncanny timing guidance. For me, they are important for timing when they act as resistance or support, and sometimes for stops.
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.
• mod
Completely different meaning and use for price channels, but as you point out, can work pretty well. I never really understood the rationale for using MAs (or offsets) as support or resistance, which is why I don't use them that way. But that's not a criticism. Minds and temperaments work differently, and it pays to know what suits you best.