It is not so much a matter of distance but time before the invasion of the safe "bubble" of airspace around the aircraft. head on at cruise speed will trigger a lot further away than a slow close in descent at a few hundred feet a minute.
TCAS is pretty damned good and as far as I know very few spurious warnings here in the UK.