* U.S. crude still headed for weekly loss
* Market shifts into backwardation, suggesting tightness
* Coming up: U.S. rig count from Baker Hughes, 1 p.m. EDT/1700 GMT (New throughout, updates prices and market activity, adds comment)
NEW YORK, Aug 18 (Reuters) - Oil prices rose on Friday as the stock market strengthened and the U.S. dollar weakened, but U.S. crude futures remained on track to close the week down as investors remained worried about the global oil glut.
The week's trading was defined by bearish data about Chinese oil demand and rising crude production in the United States.
WTI crude futures for September delivery rose $1.18 to $48.27 a barrel, a 2.5 percent gain. Brent crude futures for October delivery rose $1.40 to $52.43 a barrel, a 2.7 percent gain. Brent prices traded at a high point for the day of $52.57 and a low of $50.78 a barrel. About 218,987 lots of the front-month contract were traded by 16:15 GMT, some 65.5 percent of the previous session's volume.
"It's following the equity markets, and impacted by the dollar," said Tariq Zahir, founding member at Tyche Capital Advisors. Fundamentals for oil remain bearish as U.S. driving season nears an end, he cautioned.
Both benchmarks are on track to close the week lower, after bearish data early on.
"The main question is whether we will continue to see the kind of inventory draws that may show the supply-demand balance is tightening over the next few weeks," said Gene McGillian, director of market research at Tradition Energy.
Nigeria's crude oil exports are expected to slip to 1.72 million barrels per day (bpd) in October, loading programs showed on Friday.
Signs of supply tightness have started appearing in the United States, the world's biggest oil consumer.
Despite a 13 percent jump in production <C-OUT-T-EIA> since mid-2016 to 9.5 million bpd, the country's commercial crude inventories <C-STK-T-EIA> have fallen 13 percent from their March records to below 2016 levels.
(Additional reporting by Henning Gloystein and Karolin Schaps; Editing by David Evans and David Gregorio)