US stocks close up on Iran diplomacy hopes; tech leads

US stocks have finished higher as Donald Trump's oil market stabilisation efforts provided some relief to investors concerned about the Middle East conflict.