Baltasar Gracián said this quote

Say farewell to luck when winning. It is the way of the gamblers of reputation. Quite as important as a gallant advance is a well-planned retreat. Lock up your winnings when they are enough, or when great. Continuous luck is always suspect; more secure is that which changes. Though half bitter and half sweet, it is more satisfying to the taste. The more luck pyramids, the greater the danger of slip and collapse. For luck always compensates her intensity by her brevity. Fortune wearies of carrying anyone long upon her shoulders.