OPEN-SOURCE SCRIPT
Short & Long Relative Strength

Relative Strength (RS) is a method of identifying stocks which are relatively stronger or weaker as compared the market as a whole or to a relevant benchmark.
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.
The value of RS Indicator oscillates around zero. If value of RS is above ZERO then security is outperforming the benchmark and if value of RS is below ZERO then security is outperforming the benchmark.
Here i have used two RS indicator lines in one indicator - Short Term RS (default value is 65) and Long Term RS (default value is 123).
I have set default benchmark index as Nifty 50 (NSE:NIFTY)
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.
The value of RS Indicator oscillates around zero. If value of RS is above ZERO then security is outperforming the benchmark and if value of RS is below ZERO then security is outperforming the benchmark.
Here i have used two RS indicator lines in one indicator - Short Term RS (default value is 65) and Long Term RS (default value is 123).
I have set default benchmark index as Nifty 50 (NSE:NIFTY)
Script de código aberto
No verdadeiro espirito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam entendê-lo e verificá-lo. Parabéns ao autor Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações e regida pelas Regras da Casa.
Para acesso rápido no gráfico, adicione esse script para seus favoritos — saiba mais aqui.
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.
Script de código aberto
No verdadeiro espirito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam entendê-lo e verificá-lo. Parabéns ao autor Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações e regida pelas Regras da Casa.
Para acesso rápido no gráfico, adicione esse script para seus favoritos — saiba mais aqui.
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.