Stocks gain on fresh U.S. highs, dollar slides anew