As you know that you need to stop and leave the game? How can you feel this moment. I almost always lose their money because they can't learn when to leave the game. I'm not sorry to lose. I have a lot of money not to lose, but I can't keep the winnings if I'm lucky.
If you can leave the game when you are ahead then that is the best moment, another good moment is when you are done having your fun, that way you can save some money and use it for the next time you want to gamble, and finally another moment is to stop when you are no longer getting any fun and instead you are getting frustrated.
When you cant enjoy from gambling anymore you have to leave before loosing your deposit + winnings. It is common practice for gamblers which try to double his betting amount after lose on every single session. Check gambler's fallacy.. You will find yourself get trapped on same circle at the end.You must have edge over the gambling and keep money management rules.