As the dollar has strengthened, gold has sold off, and gold futures were at $1,191 a troy ounce Monday, a decline of 9 percent so far for the year.

Speculators are also net short for the first time since December 2001, when gold was priced at $275 an ounce, according to Peter Boockvar, chief investment officer at Bleakley Financial Group. "It's tough to find a more contrarian indicator," he noted.

Speculators betting gold investors will continue to get burned have made the biggest bet against the precious metal ever in the futures market.

The level of gross contracts held by shorts has jumped to a record 215,000 and has been at all-time highs for several weeks.

"It's literally off the charts. 215,000 contracts is double what it was the third week of June, triple what it was the second week of June. It's up nine weeks in a row," he said. Boockvar said the last time gold short bets were at a high was in 2015, and the prior record was 159,000 contracts at that time, according to CFTC data going back to 1993.

"An extreme level of positioning should be the signal we're close to bottoming out in gold in days or weeks," he said.

Boockvar calculated that for the first time in 17 years, there's a net short in gold, of 3,700 contracts. "Two months ago, speculators were net long by 120,000 contracts. By last week, they were net short," he said.

Boockvar said mining costs should stop gold from falling much below $1,100 an ounce.

"It ties into dollar action. It ties into perceptions about growth," said Boockvar. "There are so many different messages you can blame for the inevitable reversal in these positions. If gold reverses, it will mean that the dollar is topped out," he said.

Boockvar noted that the positioning comes ahead of the Fed's Jackson Hole symposium Friday, where Fed Chair Jerome Powell will speak. The shorts in gold have grown as dollar long positions and shorts in Treasurys have also gotten to record levels.

"We continue to expect prices to recover following the September FOMC meeting," noted Suki Cooper, precious metals analyst at Standard Chartered. The Federal Reserve meets Sept. 25 and 26 and is expected to raise interest rates then.