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.
Defining a consolidation, a dip below, then back up in the consolidation
I'm trying to build a scan that will catch a price where it's near but above the 52-week low. I'm looking for symbols that have consolidated near their lows, have dropped below the consolidation but then got back up on top of that earlier consolidation (e.g., GDX around the 15th to the 25th of January, where it dipped below the low for the last over a year, then got back up in the old consolidation area before heading on up).
When I ran what I have below, one of the charts (HRB) showed the last two days below any previous low for more than a year. That certainly obeys the last clause, but shouldn't the first clause keep it from including anything lower than 1% above the 52-week low? My thinking for these two clauses is that the first would keep today's close in that range near the low for the last year, and the second would keep it above the low, perhaps back up on top the low of the consolidation below the yearly low.
[[today's low < yesterday's min(260,low) * 1.02] and [today's low > yesterday's min(260,low) * 1.01]]
and [today's close > yesterday's min(5,low)