I know that as gamblers, everyone can relate to this question, as we have surely experienced it in real situations.
Suppose our bankroll is $100 and it has already grown to $500, would you quit or continue? Conversely, if with our bankroll, we are down to $10, would you still continue or save the remaining $10? I used specific amounts to make it easier to discuss this situation. I understand that we all gamble with different amounts based on our income, but consider this as an example. You can mention any amount you want based on your personal experience; it doesn't matter.
I think everything depends on how discipline are you with gambling and smart you are with gambling. The smart ones knows that you can't win continuesly in gambling, there will come a time when you will win like you are the special person in gambling and a time that will come when you will look as if you are the worst person that ever gamble in the world. If you win a game back to back and you noticed you have started losing like two times in row, it's a signal to quit and similarly when you notice the same thing in loss.
When in gambling, my focus is always how to maximize my initial bankroll and reduce anything that will bring loss, so I don't think anyone need to be told when to exit the gambling, only a greedy person will continue to play after winning a lot and doesn't read the warnings and only a careless gambler will continue to play when there is signs that the loss is high losses.