One of the established ways of measuring market sentiment is the number of stocks that are at 52-week highs and lows. It is also used to indicate the sentiment of individual stocks.
But, why stop at 52? It's a very coarse measurement, I think it would be useful to look at a much more granular level. Let's mark 4-week maxima and minima. These points indicate the reversal of direction of a given stock's price - from bullish to bearish, or vice versa:
Let's remove the price and volume information from the graph to focus on the extrema. I want the chart to convey the volatility associated with each highest / lowest day - to that effect, the extrema are drawn above and below a unity line.
Their distance from the line is proportional to the high/close ratio (for max) and low/close (for min). On days when the intraday price swung far from the eventual closing price, the extrema are drawn far from the center line.
Here you can see that on a couple occasions the action was quite volatile (~10% from eventual close) but in general the stock traded in a tight band, high/low within ~3% of closing price at each 4-week top/bottom.
Stocks are naturally grouped by sector and industry - let's plot the extrema for an industry with a couple dozen companies (in example below is the Integrated Oil and Gas industry). It's not quite clear, but there appears to be some clustering - a few noticeable days when a number of different stocks hit a 4-week high (or low). It also seems that on those days, the extrema of the opposite kind are largely absent.
Now let's take some ~3000 stocks currently listed on Nasdaq, and plot their 24-day extrema. On the graph below, the apparent bands reflect weekdays and the spaces between them are weekends. The individual points are drawn semi-transparent, to be able to show multiple points at or near the same values.
As we include more data, a pattern begins to emerge - there are some weeks when a large proportion of stocks hit a 6-week high while not many are hitting corresponding lows at the same time (and conversely for the opposite case).
There appears to be some ebb and flow between periods of stocks (locally) topping out and bottoming out.
I think this illustrates the market sentiment in more detail than the count of 52-wk tops/bottoms. It shows the current sentiment in context of the past, and makes visible a cyclic aspect of the aggregate price action over time.