Thanks for using Just Answer, the first place I would start based on the description you have given sounds like you have either a stuck or defective IAC (Idle Air Control) valve. In that case the IAC must be replaced.
If there is no movement, then the IAC is defective. Also if the fuel pressure is inadequate and below specs this can also cause a misfire, and poor performance.
The next step will be to clean the Mass Airflow (MAF) sensor. To clean the MAF sensor, carefully remove the plastic sensor from the aluminum housing, and spray the sensing elements, at the tip of the sensor, with electrical contact cleaner, or a good brake cleaner. Do not use any cleaner that will leave a residue like carb cleaner. Check the sensor passage in the housing for any debris, and if the housing inlet has a screen, make sure it is also clear of debris. Let the sensor air dry, then carefully reinstall it in the housing.Reset the Powertrain Control Module (PCM) adaptive strategy by disconnecting the battery for more than 5 minutes. This will reset the PCM's BARO calculation to a default value, usually about 150 Hz. Drive the vehicle, and do at least 3 or 4 hard-throttle accelerations, holding at least one for several seconds, as traffic laws will allow, of course.After driving, recheck the BARO reading. If the reading is within range for the shop's elevation, the codes should not return. If the BARO reading has returned to a low reading, and the MAF sensor was just cleaned, it should be replaced, then the reset and drive procedure repeated.
There also is a TSB (Technical Service Bulletin) from Ford in regards XXXXX XXXXX situation, hope this helps you out.
Click Here for TSB