I stop my slot play both when I lose and when I win - in both cases. Depends on my mood at the time of play, or if I have spent most of the deposit, or if I have spent too much time on slots.
For example, the last time I played, I stopped precisely because the deposit was lost and as much as I wanted to give away the money for the deposit, I decided not to do so.
I think there should be no exact time to draw the line, everything should depend on our feelings and our feelings should guide well when gambling if we have trained it to not be biased. You should stop when you lose more though because if you do not stop, most of the time what you will be doing is to chase after losses. When you win, you might still be lucky and if you gamble more you might win but if after winning and you gamble again and lost, that should be a sign that you should not gamble further. If you ignore that sign but continue gambling, you might end up losing more than you won and everything you did previously will become a waste therefore we should not just gamble but be observant of what is going on so you can be prepared to make the right decision and not be biased.