Nice question because many gambler still don't know when they must stops from playing gambling. Everything will be change when you can win in gambling and you can forget your limitation as in that time, your greediness will be bigger and it is hard to stops yourself from playing gambling unless you have a strong control over yourself. If you can win in gambling, you should notice that is the best time to stops gambling before you lose your money if you decide to keeps playing gambling.
There is no guarantee you can win more money in gambling so you must understand that you can only hold and limit yourself from the lose. If you already lose the money after playing gambling for some time, that means you must stops immediately because the lose can be bigger and that will makes you in a hard situation without you can decide to stops playing gambling.
There are no guarantees in gambling at all. Even personal control over one's passions does not guarantee that a person will be able to stop in time and take away the winnings. Or at least leave with minor losses. The only thing that can be more or less relied on is the understanding that the game should be perceived as entertainment, and not a way to earn money, that it should not become a regular activity. A simpler attitude contributes to the fact that a person will not squander all the money in the casino.