Shanghai nonferrous metals all closed with gains as the rapidly falling US dollar index relieved the market from heavy pressure before, and the expected recovering consumption in China also offered support.