I wrote this algorithm to possibly capture the investor psychology behind trading rather than any rational thought process. I theorized that if I measure momentum based on the number of days trading positive rather than a threshold percentage over any given time, that might perform better on certain stocks. This algo seems to work well on large cap companies with solid fundamentals. What do you all think?