Thanks Andreas Clenow for the ordering logic on https://www.quantopian.com/posts/stocks-on-the-move-by-andreas-clenow. It helped me complete my algorithm. I buy stocks every day if they make a new 500 day high. I limit it to 10 stocks per day, and rank the stocks in the basket by their momentum scores. I sell the stocks if they cross below their 15 day ATR trailing stop loss. The stocks are weighted by their APR.
I just thought I would show the site my work.