In terms of stocks, it is sometimes hard to know exactly when to pull out of a stock (I am coming to realize). Greed gets in the way. "If I've already made X today, how much more will I make tomorrow?" The answer to that question will eventually be -- without a doubt -- "nothing; you lost money today." So the important thing to do in your mind, I think, is to set clear boundaries and just stick to them. Don't look back, and don't second guess.
An interesting quote I read the other day, when someone was pulling out of a stock that still had some upside potential, but had already given fair returns:
As I step up to the teller window, I discipline myself to not reach over and grab everything I can out of the till. I speak politely, take what is owed to me, and recognize I am not The Donald.