trendinvestorpro

Stochastic based on Closing Prices - Identify and Rank Trends

StochClose is a trend indicator that can be used on its own to measure trend strength, in a scan to rank a group of securities according to trend strength or as part of a trend following strategy. Moreover, it acts as a volatility-adjusted trend indicator that puts securities on an equal footing.

StochClose measures the location of the current close relative to the close-only high-low range over a given period of time. In contrast to the traditional Stochastic Oscillator, this indicator only uses closing prices. Traditional Stochastic uses intraday highs and lows to calculate the range. The focus on closing prices reduces signal noise caused by intraday highs and lows, and filters out errant or irrationally exuberant price spikes.

Here are some examples when the high or low was out of proportion and suspect. Perhaps most famously, there were errant spike lows in dozens of ETFs in August 2015 (XLK, IJR, ITB). There were other spikes in VMBS (October 2014), IJR (October 2008) and KRE (May 2011). Elsewhere, there were suspicious spikes in IEI (April 2020), CHD (March 2020), CCRN (March 2020) and FNB (March 2020)

The preferred setting to identify medium and long-term uptrends is 125 days with 5 days smoothing. 125 days covers around six months. Thus, StochClose(125,5) is a 5-day SMA of the 125-day Stochastic based on closing prices. Smoothing with the 5-day SMA introduces a little lag, but reduces whipsaws and signal noise.

StochClose fluctuates between 0 and 100 with 50 as the midpoint. Values above 80 indicate that the current price is near the high end of the 125-day range, while values below 20 indicate that price is near the low end of the range. For signals, a move above 60 puts the indicator firmly in the top half of the range and points to an uptrend. A move below 40 puts the indicator firmly in the bottom half of the range and points to a downtrend.

StochClose values can also be ranked to separate the leaders from the laggards. In contrast to Rate-of-Change and Percentage Above/Below a Moving Average, StochClose acts as a volatility-adjusted indicator that can identify trend strength or weakness. The Consumer Staples SPDR is unlikely to win in a Rate-of-Change contest with the Technology SPDR. However, it is just as easy for the Consumer Staples SPDR to get in the top of its range as it is for the Technology SPDR. StochClose puts securities on an equal footing.

StochClose measures trend direction and trend strength with one number. The indicator value tells us immediately if the security is trending higher or lower. Furthermore, we can compare this value against the values for other securities. Securities with higher StochClose values are stronger than those with lower values.

Choose a Strategy, Develop a Plan and Follow a Process
-Arthur Hill, CMT
开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?