When a stock is above a moving average it is considered bullish, and the stock can be considered to be in a rising trend for that time frame. A good way to determine the market's condition (overbought/oversold) across a range of time frames is to analyze the percentage of stocks above their 20, 50, and 200 period exponential moving averages (EMAs).
The following chart shows these percentages for the stocks in the S&P 500 Index. The most obvious features are the negative divergences that persist in all time frames. In this case the divergences show that as the market moves higher, fewer stocks are participating in each new high. The divergence for Stocks Above Their 200-EMAs index is not severe, and the index is in the middle of the overbought range it has maintained all year long.
The shorter time frames (20-EMA and 50-EMA) have more severe short-term divergences. While these divergences can be eliminated if the market continues higher, they do cause concern at present.
One might wonder how a market index can move higher with fewer of its component stocks participating. Well, it happens on a regular basis and is usually caused by participation narrowing to the larger-cap stocks whose high capitalizations contribute more to the value of the index.
Until the current divergences are eliminated, we have to interpret them as signs of weakness and warnings of a possible correction; however, we must also remember that price is the ultimate indicator, and in a bull market price often overrides what the indicators say.