Both gold and silver retreated sharply from their all-time high levels as the US dollar strengthened and amid a decline in the US stock market.