When to have sex?

My doctor has always told me to have sex from day 9-17 every other day in order to get pregnant. Recently I had to see the midwife at our office and her advice was to wait until the ovulation test was positive, and not to have it before. After the test is positive have sex three days in a row. I am so confused and getting frustrated. Please help!