Metal detectors don't detect metallic elements in a compound, they detect electrical conductive material (usually free metal) of sufficient size (typically about the size of a grain of rice or larger) that the signal can overcome the noise floor (sensitivity limit) of the metal detector. I am not aware of any occurrence of nodules of free metal in pegmatites.
A few minerals have sufficient electrical conductivity to be detectable, in particular several sulfide and related ores, and possibly several oxides. These materials are semiconductors and with the exception of several sulfide ores, small pieces of such will not be detectable. Ordinary iron pyrites are usually undetectable. To my knowledge sulfide and chemically related ores are not present in pegmatites inasmuch as these are mostly hydrothermal minerals.
Magnetite is present in some pegmatites and because of its magnetic susceptibility (not electrical conductivity) may be detected by a metal detector if the ground balance control is offset or if the piece of magnetite is large. However not many people are interested in collecting magnetite esp. using a metal detector to locate it. The eyeball usually works better.
Maghemite (gamma ferric oxide) is a soil and rock-weathering mineral detectable with metal detectors because its magnetic loss angle (imaginary component of magnetic susceptibility) makes it hard to knock out by ground balancing. It does not occur within pegmatite mass although it can form in weathered material. Nobody besides soil and rock scientists collects maghemite. And as a matter of fact, that's what several of us First Texas Products folks did on a field expedition yesterday.