OPEN-SOURCE SCRIPT
Updated

Mansfield Relative Strength indicator

31 260
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
Release Notes
UPDATE 1: Added sector and industry as optional params. Leave them same as index if you don't want to use them

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.