This method has also been prescribed for telling the sex of unborn human babies and goat kids, or even to tell if a female human or animal is pregnant or not. I did a controlled test on both my goats and some people and it did not work.
The idea was that the chain/magnet/whatever variation you like would stay still when held over a non-pregnant subject, would swing one way for boy, another for girl, and another way for one of each. (What would it do for twins of opposite sex or triplets/quadruplets in goats? lol...). So, I tried it on a variety of goats. Here's what I got:
Known pregnant doe 1: pregnant, different results every time as to sex
Known pregnant doe 2: pregnant, different results every time as to sex
Bred doe, later confirmed not pregnant: Pregnant, different results every time as to sex
Doeling accidentally bred, unknown status, later confirmed pregnant: Pregnant, different results every time as to sex
Buck (intact male) 1: Pregnant with a boy
Buck 2: Pregnant with twins
It was correct in saying that I am not pregnant when I had it tried on me. But it also said that my husband is pregnant...hahaha now we know why he's put on some weight in the last few months! And I thought I was just feeding him too much good food.
Even if it did work, it would be very difficult for a human to hold it absolutely perfectly and not accidentally influence the direction of its swing with hand movements.