It wouldn't make any sense to buy a stock knowing you will experience a loss in order to offset some gains you may have. You will always be worse off, because you only get back a portion of your loss, never the whole amount.
If you have a loss, by all means use it to offset gains, but don't ever lose on purpose, there is no advantage to that.
Also, you can only write off a TOTAL loss of $3,000 per year, as Flat pointed out. Yes, you can carry amounts forward for a hundred years if need be until you have written off all of your loss, but you still only get back a portion based on your tax rate.
Don't stop panicing yet, but you can relax a little.