(Adds U.S. market open, byline, dateline; previous LONDON)
* Dollar falls for fourth day
* S&P 500 hovers near record high
* Emerging market shares gain
* Oil higher as Iran-driven rally gathers pace
* Graphic: World FX rates in 2017 tmsnrt.rs/2egbfVh
* For a live blog on European stocks, type LIVE/ in an Eikon news window
By Herbert Lash
NEW YORK, Aug 21 (Reuters) - The dollar weakened on Tuesday after U.S. President Donald Trump slammed the Federal Reserve for raising interest rates, while global equity markets rose as strong economic and earnings growth favored stocks in a relatively benign environment.
Wall Street shares rose, following stock market gains worldwide, with the benchmark S&P 500 edging closer to an all-time high.
Trump said in an interview with Reuters on Monday that he was "not thrilled" with the Fed under his appointee, Chairman Jerome Powell, for raising rates and that the U.S. central bank should do more to boost the economy.
Trump also accused China and Europe of manipulating their currencies. The euro is down about 3.8 percent so far this year against the dollar, while the Chinese yuan has slipped 5.1 percent this year against the greenback.
"It would appear that Mr. Trump would like to keep the U.S. dollar a little on the weak side in order to remain competitive," said CMC Markets chief markets analyst David Madden.
The dollar index, which tracks performance against a basket of six major currencies, fell 0.31 percent on Tuesday, and has slid almost 1.2 percent over the past four days, its worst such run since late March.
The dollar's weakness eased the pressure on many emerging markets, which have struggled in recent weeks as worries over Turkey precipitated a selloff in emerging market assets around the globe.
MSCI's benchmark emerging equities index rose 1.03 percent and was on track for a third day of gains after Trump's comments.
MSCI's gauge of stocks across the globe gained 0.4 percent, while the pan-European FTSEurofirst 300 index of leading regional shares rose 0.25 percent, lifted by gains in Bayer, Total and Novo Nordisk.
More encouraging earnings reports, led by medical device maker Medtronic Plc posting a better-than-expected quarterly profit, lifted U.S. equities and shares in Europe.
Sales growth and operating margins for companies in the S&P 500 set records in the second quarter and earnings should be strong for the next couple of quarters, said Michael Geraghty, equity strategist at Cornerstone Capital Group.
But a price-to-earnings multiple of 20 will make it hard for stocks to move materially higher, with earnings comparisons getter tougher and earnings growth slowing, he said.
"The reason we're up is because we're not down," Geraghty said. "There's no Turkey issue weighing on stocks today, there's been no escalation in the trade and tariff situation."
The S&P 500 hovered just below its Jan. 26 record high and was poised to mark a major milestone on Wednesday when the bull market turns 3,453 days old, making it the longest such streak in the eyes of some market watchers.
The Dow Jones Industrial Average rose 80.92 points, or 0.31 percent, to 25,839.61. The S&P 500 gained 11.3 points, or 0.40 percent, to 2,868.35 and the Nasdaq Composite added 57.48 points, or 0.73 percent, to 7,878.49.
Trump, who criticized the Fed when he was a candidate, said in the interview other countries benefited from their central banks' moves during tough trade talks, but the United States was not getting support from the Fed.
"During this period of time I should be given some help by the Fed. The other countries are accommodated," Trump said.
The dollar index fell 0.41 percent, while the euro gained 0.44 percent to $1.153.
The Japanese yen weakened 0.31 percent versus the greenback at 110.43 per dollar.
U.S. Treasury yields rose on improving risk appetite and as investors awaited the minutes from the Fed's August meeting on Wednesday and a speech by Powell in Jackson Hole, Wyoming, on Friday.
Expectations for two additional Fed rate hikes this year were lower a day after Trump's comments.
Benchmark U.S. Treasury 10-year notes fell 7/32 in price to yield 2.846 percent.
Oil rose to its highest in a week, buoyed by the prospect of price support from U.S. sanctions on Iran, though the U.S.-Chinese trade dispute kept traders and analysts cautious.
Brent crude futures rose 28 cents to $72.49 per barrel and U.S. crude rose 82 cents to $67.25 per barrel. (Reporting by Herbert Lash; Editing by Meredith Mazzilli)