Cycle day/ clomid

Doctor put me on clomid, my cycle days spot on. My cycle is 31 days long. My doctor has me take it on day 4-8. I am supposed to have sex on the 10 th day for 7 days. This app says I should start on day 13th. What should I follow?