I started buying things at 18 weeks after we got our u/s and found out we were having a little boy!! I had a m/c last year so I was reluctant to buy anything before that. During my appointment after my u/s my doctor said the baby looks excellent and is very healthy and active... so I felt confident that it was time to start preparing for his arrival. :) Just do it when it feels right to you; it's only fun when your heart is completely in the moment. Enjoy! :)
Im a little over 18 weeks and I bought some stuff when I turned 16 weeks, and the 24th is my BIG u/s so I'll really start shopping, I know how you feel I also had a miscarriage but buying or not buying stuff isnt gonna make anything happen, and also if something does happen I will have a baby one day so it wont hurt to already have some stuff.
Most women wait untill they are 24 weeks to buy anything. It is consider the point to which a pregnancy is viable. But I would say, start buy it when you feel comfortable. If you and the baby are in good health then dont stress and start planning stuff for you baby.