Stocks have roared back from their mid-June lows but have run into stiff resistance at a key moving average for the S&P 500.