but when is the best time to stop gambling and take a break?
1-when you lose?
2- when you win?
It will be foolish to take a break from gambling when you win, the only issue here is when the gambler continues to gamble due to overconfidence and greed, then it's time to take a break. But there is no problem if he has a plan and sticks to it, winning should never be the barrier. However, such a gambler is not taking the break because of the "win" but for the emotion that has taken hold of him.
As for losing, it's better you also take a break if you are becoming increasingly desperate to gamble, especially if it has turned into a revenge quest that has led to addiction.
This means that in any situation regardless of winning or losing a gambler must still be able to stop, the benefit is that in addition to being able to prevent a gambler from significant regret, this idea can also make a gambler enjoy the results of the victory he managed to get.
I understand that it is an idea that will only be easier to say than to do, because most of the cases that occur are often most of them are too confident as you said above so that they do not hesitate to continue their gambling session by applying greed.
But actually it is an idea that will not be too difficult to do if only a gambler understands the opportunities and is aware of the risks.
As I often do where when I manage to win any amount such as 2x the capital, then usually I will first cash out half or 80% of the total winnings and then continue the game with the rest. It's about how smart you are in managing everything.