It's impossible to determine the sex of your baby based on when you have sex in your cycle. The sex of a baby is determined by the sperm that fertilizes the egg. A sperm carrying a Y chromosome results in a male baby, while a sperm carrying an X chromosome results in a female baby. The timing of intercourse relative to ovulation doesn't influence which chromosome a sperm carries.
The Shettles method, a popular method for trying to conceive a boy, suggests timing intercourse for 24 hours before ovulation. However, the effectiveness of this method is not scientifically proven.
It's important to understand that the sex of your baby is a matter of chance and can't be controlled through timing or any other method.