Try:
hdays = Ref(HHV(Close, X-1), -1) < Close;
ldays = Ref(LLV(Close, X-1), -1) > Close;
The first statement says if the highest value of Close up until
yesterday over the last "X-1" periods is less than today's value of
Close. The second statement is the opposite for lowest.
Regards,
GP
--- In amibroker@xxxxxxxxxps.com,
"Don Woodyatt" <donwoodyatt@...> wrote:
>
> I'm not a programmer and I was wondering, what is the best way to
> filter for stocks that the close has been higher (lower) than the
> previous days close for X number of days.
>