Mik3Christ3ns3n

Directional Slope Strength Index

The most basic of trend indicators is the price change over some period of time. Rate of change is the most common indicator to use which calculates the current price minus the price n bars back. I've written this indicator to solve several problems the default value of ROC.

1. We're interested in the magnitude or strength of the slope of change.
2. We need a number that we can make decisions from between 0 and something close to a peak of 10.
3. We need the ability to define a threshold where a directional change might be taking place.

The Directional Slope Strength Index solves these problems by taking 1000 samples of your given Rate of Change input and calculating a standard score (or z-score) which represents the number of standard deviations by which the current rate of change is above or below the historical average. A higher number represents a stronger move up and a lower (negative) number represents a stronger move down. A value closer to 0 would represent a sideways trend or the slowing of a current trend.

A potential threshold could be 2 or -2 which is two standard deviations from the mean ROC.

The inputs can be modified to control the sensitivity.

1. A lower ROC length would provide a more sensitive measure, but still measure how that sensitive input changes over 1000 samples.
2. I recommend keeping the sample rate at 1000 as that provides enough historical data to give a more accurate distribution and therefore a more accurate DSSI (z-score).

A number of decisions can be made from the indicator:

1. When the DSSI crosses above 2, it could be a sign of a strong move upward. When below -2 it could be a sign of a strong downward move.
2. When the DSSI persists in a positive or negative channel between 0 and 2 or 0 and -2 this could indicate the formation of the next trend.
3. Values outside 2 and -2 standard deviations should be interpreted as high volatility environments.
4. For convenience, a highest and lowest DSSI have been plotted to provide references to the historical extremes.

I'm open to any questions and feedback as this is a first, original indicator for me.

Automate your TradingView strategies through TradersPost.io to your favorite broker. Equities, futures, options supported!
开源脚本

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

免责声明

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

想在图表上使用此脚本?