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

Script open-source

In pieno spirito TradingView, l'autore di questo script lo ha pubblicato open-source, in modo che i trader possano comprenderlo e verificarlo. Un saluto all'autore! È possibile utilizzarlo gratuitamente, ma il riutilizzo di questo codice in una pubblicazione è regolato dal nostro Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Vuoi usare questo script sui tuoi grafici?

Declinazione di responsabilità