fixed an issue where the trend would constantly change up/down
when the squares approached the top/bottom of the screen
test