How to scan for recent close within 10% of 52 week high

Hi sir,
I need help on scripting to scan for stocks that closes within 10% of 52 week high to be included in my watchlist. However, My current script doesn’t generate the correct results. Here’s what I wrote: CLOSE(Day(PERIODAMOUNT=1)) < 10% * HIGHESTHIGH(Day(PERIODAMOUNT=1), BARS=252). It still gives me stocks that closes 20% below their 52 week high as true.

Thanks,

YJ

Hi YJ,

This is what I use to generate closes within 10% of a 52 week high.

CLOSE() >= (HIGHESTHIGH(RANGE=LOOK BACK PERIOD,BARS=260)*0.90)

I hope that helps.

Regards,

Peter

Thank you so much Peter! That worked perfectly.

Sincerely,

YJ