Have not tried, but look at the comparison of Gold to S&P 500 for the last 30 years (1985 to 2015):
The correlation is negative, which is a sign of one going up when the other goes down. But the correlation is very weak, quite close to 0, meaning you cannot rely on this strategy in every case.
I have also highlighted the “crisis” areas (1987 recession, 2001 dotcom and 2008 credit crunch). This is where gold pays for itself to an extent. It goes dowin in late 80s whilst the market goes up, it increases substantially in 2001-2003 when the market is bearish and it goes up in 2008-2009.
The only odd moment is 2010 where both market and gold go up.
Overall, I would not trust gold, market generally outperforms precious metals in long-run, in short run in most cases as well, unless you buy it just before the crisis. But who knows when the crisis will start? Nobody.