The chart below shows the annual number of new all-time closing highs for the S&P 500 going back to 1929. Here, you can really see how a sharp pullback can really halt the frequency of new highs right in its track. After there were 45 new highs in 1929, it took 24 years until 1954 before the S&P 500 did it again. From that point on, the pace of new highs went in waves with many occurrences from the mid-1950s to mid-1960s and again in the 1980s and 1990s, while the pace slowed in the 1970s and 2000s. Since 2013 when the S&P 500 finally took out its pre-financial crisis highs, the pace has picked back up again. If the current pace of highs in the S&P 500 continues, and the S&P 500 closes at 50 or more all-time highs this year, it would rank in the top five of all years. In order to crack 1995’s all-time record of 77 for a single year, though, we would have to see one heck of a rally in the second half.
Thanks

I didn't find the right solution from the Internet.

References: https://stockaholics.net/threads/stock-market-today-june-26th-30th.4702/

Flat Animation Video