HOW TO HAVE A BABY BOY?

I know that you have to have sex close to ovulation to hopefully get a boy but is there any other factors to have a boy?

Like right now I’m on the pill & think of getting pregnant next year, how would I know I’m ovulating after getting off the pill & such?

Thank you in advance!