U.S. stocks were struggling for direction in the final hour of trading on Tuesday, ahead of a potential shutdown of the U.S.