Get Out While The Getting's Good Meaning

(idiomatic, colloquial) 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.

Example: 1912, Sarah Comstock, The soddy[1], page 200:
  Take your choice; get out while the getting's good, or we'll boom Glad-hand by starting a Boot Hill right here." A Boot Hill! Grinch reflected.
1924, James Artman, editor, The Commercial car journal[2], volume 28, page 9:
  It costs pretty near as much to sell a used truck as a new one and there is usually ... close down business right away and get out while the getting's good.