This may sound blindingly obvious, but if you've got a new det sensor telling you you've got det... maybe you're getting some det, and you need to sort that out.
What other symptoms have you got; have you changed anything recently? Is there any possibility that you are actually getting some detonation, or is there something that rattles/vibrates a little too much that could be fooling it by shaking the engine?
Obviously if you're absolutely sure that everything is sweet, then maybe you need to look at the wiring for the sensor.
Wel it was idling high yesterday until I put the earth wire on then it was ok started it today drove it and just felt like it was holding back so did the code check it came up with 34 det sensor I cleared it drove it again and it came on again so I changed the sensor but still no change don't think anything else shaking on the car was trying to get another engine loom as some of mine isn't the best