The long/short ratio peaks exactly when the crowd is most wrong. Here's the mechanism — and how to stop being part of it.