gold futures end higher after 6 consecutive session declines