After a miscarriage or a pregnancy loss, it can take about 4-6 weeks for a woman's body to clear the pregnancy hormone hCG. A urine pregnancy test can be positive for many weeks after a pregnancy loss including a D&C for miscarriage.

The only way to know for sure what's going on is to do several blood hCG tests in a row. This will show if the hCG is dropping (from the previous pregnancy) or rising (possibly from a new pregnancy). 

It is completely normal for the urine pregnancy test to be positive for up to 4-6 weeks following a miscarriage. If you think you may be pregnant, you could do a blood pregnancy test. If it rises, then you could be pregnant or it could be from a rare condition such as a molar disease.