vitvlkv

Comparative Relative Strength

1513 6 240
The Comparative Relative Strength indicator is calculated by dividing one security's price by a second security's price (the "base" security). The result of this division is the ratio, or relationship, between the two securities.
Remove from Favorite Scripts Add to Favorite Scripts
study("Comparative Relative Strength", shorttitle="CRS") 
a = tickerid 
b = input("SPX500", type=symbol) 
as = security(a, period, close) 
bs = security(b, period, close) 
plot(as/bs, title="CRS", color=gray) 
len = input(10) 
plot(sma(as/bs, len), color=navy)
thank u so much!!!!!!!
Reply
please shouldn't the value be in percentage?
Reply
@festus, I don't know)) Is there much difference?
Reply
Thanks, hard to find one that does this without finding a million RSI indicators.
Reply
Thank you. This is very useful indeed. Please can I request ability to and more than one (at least 2) moving averages.
Also, is there a way to have this price ratio displayed as the main chart? And then use the ratio data to input into other indicators such as the standard RSI. Thanks.
+1 Reply
@Shuuro, You may add indicators on top of this. So CRS plot would be a source data to other inicators.
Reply
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
AR العربية
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Contact Support Ideas Published Followers Following Private Messages Chat Sign Out