Sooo confused.

Okay, so my last miscarriage was on Oct 14th. I tracked opk this month, got a surge on the 2nd of Nov. My app is telling my my period isn't due until the 17th, when typically my cycles are 31 days long, not 34. Is this because of the miscarriage or because I ovulated a few days later than usual? I'm just trying to figure out when to test.