You buy shares when they are down and sell them when they are up, what happens in between is something of emotional kaos.
But here is the secret, and I've heard it said many times, only invest what you can afford to lose.
Casinos exist because people keep going back.