I feel so bad for asking this????

but how long after a miscarriage can you have sex..it's been a week and I'm still bleeding is that normal and I will probably wait like 3 weeks just to make sure but just wanted others opinion