When you start thinking about leaving, choose your moment carefully. Go out while you’re still on top, not when you’re no longer in control of events.