Your failure is one of risk management. As others have said, have a defined stop-loss before you enter any trade and adhere to that stop-loss no matter what.
Furthermore, a good metric to determine your risk management skills is how long you're holding onto your losing trades. Have a rule for...