get out while the getting's good
verb
°(colloquial) To leave at an opportune time or before adverse conditions appear.
°To sell all or part of one's holdings in stocks, real estate, a business, etc. while conditions are good, particularly in anticipation of a drop in prices.
synonyms: bail out, 23 skidoo