You can't always catch the best moments but you can catch good moments and that's what you have to do to keep going on well.
Your example might hit the majority here including me lol.
Feeling regret is always part of the game. We can't just say it's our mistake that we didn't anticipate what will happen because, in the first place, there is no way we can tell it. As long as we bag some profits out of trading, take it as an achievement. It's way better than we sold because we want to minimize the loss.
What matters here is, just continue. Our experience will teach us how to deal with a different scenario.