Mansfield Relative Strength indicator

Use this indicator to compare how security is performing in compare with preferred index ( SPX by default).
> 0 outperforming
< 0 underperforming

Works best for weekly, but can be applied to monthly and daily charts . It will be rather useless to use it in smaller timeframes
Apply it to SPX , industry index, sector index or other security in similar sector
Versionshinweise: UPDATE 1: Added sector and industry as optional params. Leave them same as index if you don't want to use them
Open-source Skript

Ganz im Sinne von TradingView hat der Autor dieses Skripts es als Open-Source veröffentlicht, damit Trader es verstehen und überprüfen können. Ein Hoch auf den Autor! Sie können es kostenlos verwenden, aber die Wiederverwendung dieses Codes in einer Publikation unterliegt den Hausregeln. Sie können das Skript den Favoriten hinzufügen, um es auf dem Chart zu verwenden.

Möchten Sie dieses Skript auf einem Chart verwenden?


m unable to load it to my scrips, plz tell from u getvthis indiactor in trading view..thanks
+11 Antworten
lotusheart naizycm
@naizycm, it worked ! just copy paste
+1 Antworten
How can I change this to use the FTSE 100 ass the benchmark, all help appreciated
+2 Antworten
Thank you ! I've been looking everywhere for this !
+1 Antworten
very helpful thanks. What is the period/length? I understand the option to check moving average on/off but couldn't tell what the length is for
+1 Antworten
@Borsaliz, By default 200 for daily, 52 for weekly, 10 for monthly. It can be changed in settings. Stan Weinstein used 52 for weekly in his book, I wanted to adapt it for shorter and longer timeframes if you're switching between timeframes without the need to constantly change length of MA
Borsaliz OstapChester
@OstapChester, thank you
I am still not able to figure out the color coding (Background Color Style) for this.
I would like it to have green colored when it is above 0 line and Red color when below 0 line. How can I do that ?

Any help appreciated.
Hi, This isnt working if the company is new and doesnt have 200 days/52 weeks of history. Is there a way to get RS during that period as well?

This script is getting even when there is no history. Please share your thoughts.

@vdtedla1, how do you expect to calculate RS without data? :) Obviously, it cannot work in such case