Gold prices end modestly higher after three session decline