I'm looking for a stock screener that is capable of programming a stock screen like the following: Screen for stocks trading within 5% of their 52-week highs. Then sort them by the # of days that have passed since their 52-week low. Keep the stocks with the shortest # of days since their 52 week low (say the lowest 5%.) I don't mind learning some programming in order to make such a screen. I need a stock screener that can define a custom, nonstandard parameter, compute that parameter for all the stocks in its universe, then find, say, the top 5% percentile for that particular parameter.