When to leave is the hardest decision a gambler is facing, for me you need to know your limitation on taking bets like if you lose 50$ then tell yourself thats enough.
Or if you won a few hundred dollars breathe and drink and tell yourself thats enough for today.