On top is the S1FI index which displays the percentage of S&P 100 companies trading above their 50 day moving average. Below is the S&P 500 .
When coming off a long upward trend, shares will almost all immediately go under their 50 day MA because that MA is so high. You see that with the June/July run followed by the August drop. When consolidations occur, share prices will range trade sideways (and ultimately oscillate around their 50 day moving averages). When an uptrend resumes you get a sustained percentage of companies consistently trading above the 50 day MA.
The chart on top shows the whole story as well as the likely outcome ... a resumption of higher prices. When more than 70% of the S&P 100 companies are above the 50 day MA you often get a correction. When 30% or fewer are under the 50 day MA things are often oversold. Of course, crashes will see unrelenting damage to 50 day MAs.
Here we see a triangle forming (green ) as the consolidation comes to an end. Notice this latest repeat of the same pattern (March 2015) happens within the 70% / 30% lines. The sideways drama of range trading is probably in its last weeks, and with moving averages having been tamed with sideways trading for months, there is plenty of room for shares of these leaders (the S&P 100) to move higher on a sustained basis without being "overbought" even at new all time highs. They'll drag the other 400 of the S&P500 with them.