Your engine is hunting. This has nothing to do with the altitude. It is most commonly due to a bad or dirty ICV, but then that behaviour should be the same at all altitudes.
Can you pull codes from the car ? Does the stomp test work or do you have a code reader ?
If you don't and can't get to one easily....try this. Delete all the error codes. Just unclamp your Ecu for a few minutes and reclamp it. Then start the car and see if the engine hunts.
If it still does, it will be time for you to start disconnecting components to identify the gremlin. Disconnect the following, in this order :
1. AFM. Pull its plug.
2. O2 sensor (by removing the O2 sensor relay).
3. ECT (engine coolant temperature sensor, the blue sensor on the cylinder head, closest to the front of the engine and there are two over there). Disconnect it.
Disconnect them all in order until all three are disconnected. Once you've zeroed in on the suspect, reconnect everything else except the suspect and reconfirm, then you've identified your gremlin. Delete the error codes for everything else, replace the defective component, then delete the error codes again.
I once had this same stupid hunting problem. Paid a bmw specialist workshop to fix it. They took 30 minutes and charged me $80. The fault? The switches for the two coolant temperature sensors in the cylinder head (on leads to the ecu, the other leads to the dashboard gauge) had been switched around ! Still can't believe that it was that simple and it cost so much.
Since you've been doing some engine swapping (?) there is a possibility that you mixed something up in the wiring.
Wait.....hmmm........i remember something now. Yes we've seen this problem before. Look at your throttle position switch (tps). Make sure you've connected the correct socket from the wiring harness to this. There might be a switch for the intake temperature sensor right near the brake booster fitting that you could have mixed up with this.
For good measure, please clean your tps and its socket with contact cleaner, apply dielectric grease on both, and fix it back. The tps could well be the problem.
Hmm......you know what ? Add the tps to the disconnect list stated earlier. Put it at the top of the list. See if that solves the hunting.
Last edited by robertobaggio20; 11-29-2012 at 10:26 AM.