When do you stop? Do you have a daily limit or something?
When my budget plan limit reached the limit. Personally, i budget my money in many ways it includes my budget for gambling. I stop gambling when the minimum limit is reached, because in gambling if you don't set a limit your money will not be organized, which may result to money deficiency or money deficit or bankrupt.
That would work in all of the time because if you don't have any funds in your gambling account then this just means that you have to call it a day and try again another day. I'm also doing this trick, it might be impossible at first because the greed might overcome you but this really works, trust me. Also, if you have self discipline in your self, then losing is enough for you to stop playing gambling in an instant.