Are you sure it's pinking? Pinking is usually caused by dodgy petrol or too much advance on the ignition.. more an old-school carbs & points problem.. since modern engines are run by a computer. If you had a knock sensor problem, I'd guess that you'd have other problems with the ignition too.
So....check the physical stuff. HT leads (the metal collars under the rubber boots, where they connect to the coils and plus respectively.
Also check the receiver on the coils where the HT leads attach. Look for "pencil lines" that mean there's been arcing... cracks, burns, scores, meltedness etc.
Remove the spark plugs (go for a longish run first to get the car warmed right up and then don't let it idle when you get back.. just turn it off and let it cool down) .. Look at general plugs condition and for one or more unusual plugs (sootier than the others, oilier, whiter etc) .. If the plug gaps need gapping, gap them. If the expensive plugs are worn out, stick new ones in there.
It might be worth sticking some paraffin in the tank.. about 250ml for a full tank .. every time you fill up to act as an injector cleaner .. (or use Red-X etc. if you want more or less the same thing for 400% of the price..
Finally if it none of this works, get some Octane Booster (or fill up a whole tank with 99 or 100 Octane "Plus" fuel.. I believe Tesco's and maybe Esso flavours are best) and see if the pinking goes away. If it's still doing it with 100 RON petrol, then whatever the noise is, it's *unlikely* to be pinking.