Share prices on American equity markets have retreated after earlier gains took them just into record territory.