TradeStation

How Old Is this Bull Run Getting? Check MA Test Bars Since

There are many price-based techniques for anticipating the end of a move. However, the simple passage of time can also help because bull markets don’t last forever. While old age doesn’t necessarily cause investors to sell, a reversal becomes more likely the longer a trend lasts.

So, how long have prices been going up? There are various ways to measure that. Our earlier script, MA streak, offered one solution by counting the number of bars that a given moving average has been rising or falling.

Today’s script takes a different approach by counting the number of candles since price touched or crossed a given moving average. It tracks the 50-day simple moving average (SMA) by default. It can be adjusted to other types like exponential and weighted with the AvgType input.

In the chart above, Bars Since MA Test was adjusted to use the 200-day SMA. Viewing the S&P 500 with this study helps put the current market into context.

We can see that prices last touched the 200-day SMA 386 sessions ago (June 29, 2020). That’s relatively long based on history, but not unprecedented. For example, the indicator was at 407 in February 2018 as the market pulled back. It also hit 475 in October 2014 (following the breakout above 2007 highs).

Additionally, the S&P 500 is nearing the record of the 1990s bull market (393 candles on July 12, 1996).

Before that, you have to look all the way back to the 1950s, when it twice peaked at 627.

The conclusion? The current run without a test of the 200-day SMA is above average, but not yet record-setting. It may be interesting to watch as earnings season approaches and the Federal Reserve looks to tighten monetary policy.

TradeStation is a pioneer in the trading industry, providing access to stocks, options, futures and cryptocurrencies. See our Overview for more.

Important Information
TradingView is not affiliated with TradeStation Securities Inc. or its affiliates. TradeStation Securities, Inc., TradeStation Crypto, Inc., and TradeStation Technologies, Inc. are each wholly owned subsidiaries of TradeStation Group, Inc., all operating, and providing products and services, under the TradeStation brand and trademark. When applying for, or purchasing, accounts, subscriptions, products and services, it is important that you know which company you will be dealing with. Please click here for further important information explaining what this means.

This content is for informational and educational purposes only. This is not a recommendation regarding any investment or investment strategy. Any opinions expressed herein are those of the author and do not represent the views or opinions of TradeStation or any of its affiliates.

Investing involves risks. Past performance, whether actual or indicated by historical tests of strategies, is no guarantee of future performance or success. There is a possibility that you may sustain a loss equal to or greater than your entire investment regardless of which asset class you trade (equities, options, futures, or digital assets); therefore, you should not invest or risk money that you cannot afford to lose. Before trading any asset class, first read the relevant risk disclosure statements on the Important Documents page, found here: www.tradestation.com/important-information.
오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?