It is basically grammatically correct, except for a missing comma, but awkwardly worded. It would be better said as:
We could quit now, while we are a success
In normal English, the popular phrase is:
Let's quit while we're ahead.
Let's quit now, while we're ahead
[Note where the comma is used]