Stocks dip but set for fifth month of gains; dollar slips