Before entering a trade, specify the profit goal you are aiming at, and as soon as you reach your goal close the trade. Do not feel tempted to stay in longer that you decided.
Likewise, when trades go wrong, do not convince yourself that staying longer will play in your favor. Get out as soon...