Welcome to the forum. The primary TPS (throttle position sensor) may be causing your idle problem. also lube all the linkages in and around the throttle bodies. Good luck.
The primary TPS is usually the culprit, but if you changed it and set the resistance it should be ruled out. Spray the throttle linkages with lubricant, check the vacuum hoses and check the low tension connectors on the coils. Good luck.
The primary TPS is usually the culprit. But as you have already replaced it, that's strange. Was it set to the correct setting when installed? Also spraying the throttle linkage with lubricant/cleaner may help.