A rally in exchange traded funds that invest in gold miners has carried the sector ETFs close to their all-time highs from late 2010.

Market Vectors Gold Miners ETF (NYSEArca: GDX) is reasserting its relative uptrend against the S&P 500 as the fund eyes a new record relative high, said Tarquin Coe, technical analyst at Investors Intelligence. The ETF was listed in 2006. [Miner, Silver ETFs Pick Up Momentum]

“Last week the ETF’s 50-day exponential moving average rose up through the 200-day exponential moving average, printing a’ golden cross,’ a bullish signal,” Coe wrote in a newsletter Monday. “U.S. debt uncertainties are providing a tailwind to yellow metal related stocks and that should be enough to soon drive the fund beyond the all-time high of $64.62 a share.”

Market Vectors Junior Gold Miners ETF (NYSEArca: GDXJ) invests in small-cap miner stocks.

The miner ETFs have been getting a boost lately from rising gold prices. [Debt Uncertainty Drives Investors to Gold ETFs]

“Gold is the trade which continues to work in the current climate. Long-term it has done likewise, trumping all other classes for the past several years,” Coe wrote. “Today, SPDR Gold Shares (NYSEArca: GLD) has broken out to a new all-time high as SPDR S&P 500 (NYSEArca: SPY) flounders beneath its 2011 highs. A resolution to the U.S. debt ceiling talks will no doubt cause respective reversals in both these instruments, with a correction in GLD and a break higher by the SPY.”

The analyst, meanwhile, called miner stocks “perhaps a middle-of-the-road compromise.”

Full disclosure: Tom Lydon’s clients own GLD and GDXJ.