Really long period that stops and starts why?

Britney • I'm a happily married to the love of my life and I'm a 27 year old who is graduating university soon this year and is hoping to start having some beautiful babies soon! We have had one pregnancy and miscarriage at 7 weeks so far hoping for a rainbow baby
I've had a super weird long period this month and I was wondering if anyone knows what would cause it? We are ttcing first it was five days early on Cd 25 and it was really heavy with no clots for five days then it stopped completely for three days then came back medium flow but more brown then it was less and less but continued for three more days with tons of egg white cm and was brown it began the second time with really bad cramps bloating and feeling sick what do you guys think is happening? Thanks!