Yes, I have lost confidence before. It happens. This is a tough game. It's one reason why I shifted from position trading, to day trading.
One thing that helped me was to study all the situations where the market changed directions to see if i could find things in common. Once I identified those, I would exit then, while I still had some profits, rather than waiting for my stop to get hit.
I noticed it is easier to ride smaller time swings, than larger ones. You make less, but losses are caught faster so you keep them in check better. It's essential if you have a small account..even more so when you have to randomly take $1500.00 out of it to rebuild the rear end on your truck....