Well, the "percentage thing" is a bit tricky, since some of your values are zero. Any percentage of zero is zero and you'll probably get a division by zero somewhere in the code.
You also would need to decide if the difference threshold should be defined as percentage of the current value or of the previous value.
In general, you would just replace the comparison with a percentage calculation, but be aware of the mentioned issues)