9w+2d pregnant, and the risk of miscarriage :(

Hi everyone, last night I had bleeding in brown colour, and the doctor said there is risk of miscarriage! I was so upset, I have been waiting for this baby for so long, because I have PCOS. Today, I saw my baby in usg, there is strong heart beat, baby looks okey, but still miscarriage risk is present. I started using progesteron pills and weekly injection, and bedrest recommended. Anyway, are there any guesses for baby's gender? I heard ramzi theory in this app. I dont know much about it, this could be a good chat for me to relax and not think about miscarriage :)