The S&P 500 index ended lower on Wednesday, with charts suggesting the index's five-month rally was growing long in the tooth.

Based on the latest available data, the Dow Jones industrial average <.DJI> was up 2.27 points, or 0.02 percent, at 12,042.43. The Standard & Poor's 500 Index <.SPX> was down 3.58 points, or 0.27 percent, at 1,304.01. The Nasdaq Composite Index <.IXIC> was down 1.03 points, or 0.04 percent, at 2,750.16.

The index is starting to look overbought again after touching 2-1/2-year highs Tuesday. A key measure of the rally's strength suggests stocks are vulnerable to a correction, analysts said.

The PHLX Semiconductor Index is running into resistance around 450, a level not surpassed since 2007. Chips are considered a leading indicator for the broader market.

(Reporting by Caroline Valetkevitch)