Everybody has bad luck at some times, the guys who lose are the one that panic buy/sell whenever they change their minds like sheep.
a good way to avoid that is to put a sell order in at a custom price.
For example: say current price was $17.80 and you wanted to sell at $18.10.. just put in the order at $18.10, and whenever someone is willing to buy at that price (or essentially you are the cheapest seller), the order will be filled and you will get the price you want.
...downside of that is that if somebody did that today at $40.. its now up to $43.50 and they'd of lost out of about 8% of gains in a matter of hours