When did I ovulate and what days did I have to have sex?

If I'm due on July 4th when did I ovulate and when did I have to have sex?? 
Also is a 13 week ultrasound the more accurate due date or should I go by my due LMP? This is confusing 

Glow Resources

Let’s Glow

Glow is here for you on your path to pregnancy

Glow helps you navigate your fertility journey with smart tools, personalized insights, and guidance from medical experts who understand what matters most.

25+ million

Users

4.8 stars

200k+ app ratings

20+

Medical advisors