TORONTO, April 15 (Reuters) - Canada's main stock index edged up to a six-week high on Wednesday as investors weighed prospects of a resolution to the conflict in the Middle East, but declines for energy and metal mining shares helped limit gains.
The S&P/TSX Composite Index ended up 53.63 points, or 0.2%, at 34,155.99, marking its highest closing level since March 2, when the index posted a record high.
U.S. President Donald Trump said the war he launched with Israel on Iran was close to over, as the army chief of mediator Pakistan arrived in Tehran to try to prevent a renewal of the conflict.
"Markets are taking their cues from developments around Iran ... but Canada's oil-heavy exposure means softer crude prices are limiting how far the rebound can go," said Brian Madden, chief investment officer at First Avenue Investment Counsel.
The technology sector rose 3.6%, with shares of e-commerce company Shopify adding 8.1%.
Heavily weighted financials ended 0.9% higher.
Four of 10 major sectors lost ground, including energy, which was down 0.5%.
The price of oil, one of Canada's major exports, settled 1 cent higher at $91.29 a barrel but was trading well below the peak levels it reached in recent weeks.
The materials group, which includes metal mining shares, fell 1.8% as the price of gold fell.
Shares of BRP tumbled 35.4%. The powersports products company suspended its guidance following a recent amendment to U.S. sectoral tariffs.
BRP's decline weighed on the consumer discretionary sector, which fell 2%.
(Reporting by Fergal Smith in Toronto and Tharuniyaa Lakshmi in Bengaluru; Editing by Jonathan Ananda and Lisa Shumaker)
By Tharuniyaa Lakshmi and Fergal Smith



















