The S&P/ASX200 rose two points on Tuesday, up 0.02 per cent to 8,793.3, as the broader All Ordinaries gained 2.2 points, or 0.02 per cent, to 8,976.9.
The top-200 dropped more than 58 points in early trade as oil prices clung to recent gains and strikes between Iran and the US continued.
However, crude eased in the afternoon and gold prices bounced on reports Iranian officials received a ceasefire proposal from US mediators, potentially opening the door to a permanent peace agreement.
While the uncertainty in the Middle East had contributed to the Australian market's lack of direction, traders were also holding back ahead of key economic updates and results, IG analyst Tony Sycamore said.
"Over the next week we'll get labour force and inflation updates - both critical inputs for the RBA ahead of its next interest rate meeting - while the August ASX200 earnings season is also fast approaching in the rear-view mirror," he said.
"With so much on the horizon, it makes sense that many who are already positioned are happy to hold tight for now, while those looking to open fresh positions are choosing to wait a couple of weeks for more clarity."
While the tech sector outperformed with a 3.3 per cent charge, the heavily-weighted materials also supported the bourse, up 1.3 per cent as gold and copper prices rallied into the afternoon.
The All Ordinaries gold sub-index soared 3.6 per cent as the precious metal firmed to $US4,073 ($A5,810) an ounce after ceasefire hopes softened the outlook for global inflation, and therefore for interest rates.
BHP shares jumped to $58.29 with copper's surge to its highest price in five weeks, while Rio Tinto traded flat and Fortescue lost 1.3 per cent as iron ore futures lingered near mid-February lows.
South32 rallied for a second day on the back of its June quarter trading update - it has gained more than 11 per cent since Friday's market close.
The IT segment rally was led by data centre group NextDC, which charged more than seven per cent higher after increasing its contracted utilisation, with a rebound in South Korea's tech-heavy KOSPI index supporting an uplift in global technology stocks.
The heavyweight financials sector fell for a third straight session as investors continued to take profits on a recent rally in the major banks and Macquarie.
In company news, Telix Pharmaceuticals improved after it lifted its June quarter revenue by more than a fifth year-on-year in an otherwise glum session for health care stocks.
The Australian dollar is buying 70.18 US cents, up from 69.90 US cents on Monday at 5pm AEST.
ON THE ASX:
* The S&P/ASX200 rose two points, or 0.02 per cent, to 8,793.3
* The broader All Ordinaries improved by 2.2 points, or 0.02 per cent, to 8,976.9
One Australian dollar trades for:
* 70.18 US cents, from 69.90 US cents at 5pm AEST on Monday
* 114.06 Japanese yen, from 113.53 Japanese yen
* 61.44 euro cents, from 61.12 euro cents
* 52.18 British pence, from 51.93 pence
* 119.71 NZ cents, from 119.49 NZ cents