Make it stop!

My period is two weeks long every month some days I'm spotting and some days I bleed through every hour or two with clots larger than a quarter, this is more than whe. I had a miscarriage. I'm trying to have a baby in my 40s, what's wrong with me? How do I know when I'm fertile? It feels like I'll never be.....