By Anora Mahmudova and Sara Sjolin, MarketWatch

Falling dollar boosts oil futures

U.S. stocks ended Tuesday slightly lower, as earlier gains faded by the end of the trading session. Investors remained cautious ahead of the important jobs report on Friday and a looming deadline for Greece and its lenders to find a solution to the country's debt crisis.

News that Greece's creditors have reached a consensus (http://www.marketwatch.com/story/greeces-lenders-agree-on-draft-bailout-deal-to-put-to-athens-2015-06-02) on the terms of a proposal that would be presented to the Greek government as well as positive inflation data (http://www.marketwatch.com/story/inflation-returns-to-eurozone-after-6-months-2015-06-02)sent the euro soaring against the dollar (http://www.marketwatch.com/story/dollar-hits-fresh-12-year-high-against-yen-2015-06-02-11033929). A weaker dollar, in turn, boosted oil prices.

The S&P 500 (SPX) closed 2.13 points, or 0.1%, lower at 2,109.60, with five of its 10 main sectors ending higher. Energy and materials stocks led the gains, boosted by rising oil prices, but utilities sold off.

The Dow Jones Industrial Average (DJI) lost 28.43 points, or 0.2%, to 18,011.94. The Nasdaq Composite (RIXF) finished the day down 6.40 points, or 0.1%, to 5,076.52.

Investors assessed factory orders data, which fell short of expectations, falling for the eighth time in nine months, as well as monthly car sales.

Colin Cieszynski, chief market strategist at CMC Markets, said the moves over the past few days have been tepid and mostly due to lack of significant news.

"Stock investors are simply waiting for labor market data, beginning from ADP on Wednesday and official jobs report on Friday," Cieszynski said.

"When we get the jobs figures, attention will then turn to Fed speculation," Cieszynski noted.

While the market has been trading sideways over the past few weeks, the main indexes are hovering near record levels, having pushed up valuations to the highest levels in the financial crisis in 2008.

Nick Colas, chief market strategist at Convergex, a global brokerage company based in New York, said stock valuations imply higher volatility ahead.

"Over the next four to six months we expect to see a 3%-5% pullback and would advise clients to rebalance their portfolios, reducing exposure to U.S. stocks," Colas said.

Tuesday's data:Orders for goods produced in U.S. factories (http://www.marketwatch.com/story/us-factory-orders-fall-for-eighth-time-in-nine-months-2015-06-02) slipped 0.4% in April, marking the eighth decline in nine months, the Commerce Department said Tuesday.

U.S. car and light truck sales reached a seasonally adjusted annual rate of 17.79 million in May, up from 16.5 million in April, according to Autodata. According to separately tabulated data from Haver Analytics, that is the highest rate since July 2005.

Federal Reserve Governor Lael Brainard in a speech on Tuesday (http://www.marketwatch.com/story/feds-brainard-indicates-she-wont-support-a-rate-hike-in-june-2015-06-02) said soft data in the first quarter raises questions about the outlook and don't support an immediate liftoff, suggesting she wouldn't support a rate increase at the Fed's June policy meeting. Brainard is a voting member of the Fed's policy-setting committee.

Earnings:Dollar General Corp.(DG) posted a profit that beat forecasts, but sales fell short of expectations. Shares rose 3%.

Guess Inc.(GES) shares jumped 6% in extended trade after the retailer swung to profits.

For more on today's notable movers read Movers & Shakers column (http://www.marketwatch.com/story/dollar-general-cracker-barrel-guess-earnings-in-focus-2015-06-01).

Other markets: Asian markets ended mixed, with the Shanghai Composite Index closing 1.7% higher.

The weaker dollar gave support to commodities. Crude oil (http://www.marketwatch.com/story/oil-prices-lifted-by-dollar-saudi-comments-2015-06-02)(CLN5) climbed as upbeat comments by Saudi Arabia's oil minister helped lift the U.S. benchmark to its highest settlement of the year, up 1.8% to $61.26 a barrel. Gold futures (http://www.marketwatch.com/story/gold-edges-higher-as-dollar-pulls-back-2015-06-02)(GCN5) settled 0.5% higher at $1,194.40 an ounce.

Subscribe to WSJ: http://online.wsj.com?mod=djnwires