Is it safe to have sex at 6 weeks

I recently had two miscarriages and I'm now 6 weeks pregnant. I'm trying everything I can to have a healthy baby. Is it harmful to have sex 6 weeks pregnant when I have history of miscarriages?