ovulation question

Took ovulation test in am very positive 
Took one early evening and negative 
Had sex when husband got home around the time I took the second one. 
Was that optimal timing or probably not?