Irregular Periods

M

My periods have been irregular for the longest time ever and its very hard to pin point when I ovulate and when to a pregnancy test because i dont even know when AF is even suppose to come. My dr ive been going to for years said i could be put on birth control so itll help BUT Im ttc and harder than ever ! AF comes randomly its very different month to month. Sometimes Ill go a full month without her showing up and still wont be pregnant other times she'll show up the day after I test.

So how do i know when to test and how can I fix these irregular periods