Miscarriage followed by chemical pregnancy

Suzanne

I turned 40 at the end May. And I have had two back to back miscarriages. One I lost a 6 weeks and the other a chemical. I wondering if I should keep trying. Everyone is different but I’m guessing I don’t have any good eggs left. Anybody with similar situation and have a successful pregnancy?