OPEN-SOURCE SCRIPT

Relative Strength (IBD Style)

已更新
This script is meant to give you a Relative Strength indication of the stock. The goal is to use a similar calculation as used by IBD.
It calculates the performance of the current stock for the last year (most recent quarter is weighted double) and compares it to the performance of a reference index or ticker (default is "SPY").

IBD would give you a value between 0 and 100 because this value is the percentile within all stocks. This is not possible with Pine Script at the moment.
So here you get a Relative Strength value that is >0 if the stock is stronger than the index and <0 if it is weaker than the index.

You can still compare the Relative Strength values between stocks (bigger is better) but you won't know which percentile it is right off the bat.
版本注释
Fix typo and update chart.
版本注释
Update chart.
版本注释
Update chart.
版本注释
Improve performance value display.
版本注释
Streamline performance calculation.
版本注释
Update chart.
版本注释
Fixed a bug where the display would jump around during open market when you opened the reference ticker.
版本注释
Update chart.
版本注释
Fix chart flickering when viewing the reference.
版本注释
Fix broken graph.
版本注释
Fix broken graph. (Followup)
版本注释
Go back to quarterly calculation instead of monthly.
ibdrelativestrengthRelative Strength Comparisonrsc

开源脚本

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

想在图表上使用此脚本?

免责声明