Detect direction of the stops