Sex after miscarriage

Just wondering when to resume sex after a miscarriage. My doctor never really gave me a clear answer. When I was in the emergency room, the dr there said my cervix was closed and an u/s confirmed a "complete miscarriage". I am still bleeding and spotting of and on, it lightens and gets a bit heavier and lighter again.