That's why you need to frame your buy and sell rules before you buy. Don’t make impulsive decisions. Control your emotional behavior in the market. Benjamin Graham, the investment guru, tells “Adopt simple rules and stick to them.”
When you stick to your own rules you'll me far more likely to see a positive outcome.
If you want to learn more check out these resources: