In a tax sheltered account, losses cannot be used to offset any gains. In the case if it a person was day trading within the account, it is a good question about losses and curious to find out.
In a non-tax sheltered account, the other thing I learned recently was that only 50% off the losses can be used toward capital gains back 3 years or carried forward indefinitely. I guess that makes sense since only 50% of the capital gains are taxed.