simplify up/down trend logic