quit while one is ahead

Verb

 * 1)  To stop taking risks before one starts losing.