bad connection in the bulb socket will cause the same issues.do a quick search and you will see that alot of tranny problems are caused by a bulb.as far as trouble shooting it,take it to a shop and have a scanner put on it to see if you have any trouble codes for the tranny.but some of those codes will come up because of a bulb.you may need to adjust or replace the range sensor on the side of the tranny.it tells the pcm what gear you are in.that stupid switch on the master cylinder(the one that burns f150s and broncos but not the f250,350 and 450s) will also screw with the tranny.on the passengers side of the tranny there is a shield held on by 2 bolts.there is a connector behind it.unplug itg and see if there is tranny fluid,oil or water in it.that will mess with the tranny as well.