Relative Strength

modhelius Pro+ 已更新   
Relative strength is a ratio between two assets, most often a stock and a market average (index). This implementation uses the method described here and the second method described here to calculate its value: "To calculate the relative strength of a particular stock, divide the percentage change over some time period by the percentage change of a particular index over the same time period". This indicator oscillates around zero. If the value is greater than zero, the investment has been relatively strong during the selected period; if the value is less than zero, the investment has been relatively weak. The period and the comparative symbol can be set in the settings for the indicator (the defaults are 50 and SPX ), there you can also find an option to turn on a moving average.
Update to Pine Script Version 4 and add resolution to study.


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