This is the indicators showing the stock relative strength comparing with SPX500.
positive means the stock is strong than spx500
negative means weak than spx500
positive means the stock is strong than spx500
negative means weak than spx500
study("relative strength to SPX500", shorttitle="mrs") a = tickerid b = input("FX:SPX500", type=symbol) as = security(a, period, (close-close[1])/close[1]*100+100) bs = security(b, period, (close-close[1])/close[1]*100+100) rs=(as-bs)/bs*1000 plot(rs, title="mrs", color=navy) len=input(13) plot(sma(rs, len), color=green) hline(0, title="Zero", color=gray, linestyle=dashed) hline(-30, title="down", color=gray, linestyle=dashed) hline(30, title="up", color=gray, linestyle=dashed)