OPEN-SOURCE SCRIPT

RS Theory Indicator

How to Use:
Customize the Reference Symbol: In the settings of the indicator, you can change the referenceSymbol to the benchmark or asset you want to compare against.
RS Interpretation:
RS > 1: The current asset is outperforming the reference symbol.
RS < 1: The current asset is underperforming the reference symbol.
RS = 1: The current asset and the reference symbol are performing equally.
Alerts: You can enable alerts for when the RS crosses certain levels (e.g., when RS > 1 or RS < 1).
How It Works:
Reference Symbol: The user inputs the benchmark asset or symbol (e.g., "SPY" for an S&P 500 ETF). This will be used as the comparison symbol.
RS Calculation: The RS Value is calculated by dividing the current asset's close price by the reference asset's close price:
RS
=
Close Price of Current Asset
Close Price of Reference Asset
RS=
Close Price of Reference Asset
Close Price of Current Asset


Plotting:
The RS value is plotted on the chart as a line.
A horizontal line at RS = 1 is drawn for easy comparison, representing parity (when the asset and reference symbol have the same price).
Background Coloring: The background is colored:
Green when RS > 1 (indicating the asset is outperforming the benchmark).
Red when RS < 1 (indicating the asset is underperforming the benchmark).
Alerts: Alerts are triggered when the RS value is above or below 1, indicating outperformance or underperformance relative to the benchmark.
Breadth Indicators

オープンソーススクリプト

TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。

チャートでこのスクリプトを利用したいですか?

免責事項