Back when I was still playing dice, I always have a set of stop loss and target profit. If i reach either the set amount for loss or win, I will stop gambling. But now, I only gamble on sports betting so it is easier to manage. I only bet on one sports and it is a set amount.