something like:

if ( direction * (event.price - order.stop)) < epsilon:

with epsilon = 0.001

so that if they are a penny away nothing happens