Percentage Relative Strength

A relative strength indicator that compares your main symbol (one on your chart) strength to another symbol by percentage.
The result is plotted as a histogram showing which symbol is rising or falling more in percentage.
In case your chart symbol is TSLA ( Tesla ) and the indicator 'Symbol to compare' is SPX:

GREEN area (above zero) means TSLA is rising more than the SPX .
RED area (below zero) means TSLA is falling more than the SPX .

To these who wants to understand calculation, it's pretty straightforward.
For each asset we calculate everyday percentage change based on previous close and current close.
We take main asset (chart symbol) percentage and subtract it from percent of change of the symbol we want to compare to.
Result are smoothed by SMA ( Simple Moving Average )
You can select different indexes or cfds such as S&P500 (SPX) , NASDAQ 100 ( NSX ), RUSSELL 2000 (RUT) and NASDAQ (IXIC).
Default is S&P 500 (SPX) .

Enjoy and Like if you like.
Phát hành các Ghi chú: NEW: Added option to add your own symbol! Just fill the input box with the symbol you want to compare to or use predefined presets.
Added more moving averages (EMA, RMA and WMA)
Mã nguồn mở

Với tinh thần của TradingView, tác giả đã xuất bản tập lệnh theo mã nguồn mở, vì thế trader có thể dễ dàng hiểu và tùy chỉnh được. Bạn có thể sử dụng miễn phí, hoặc tùy chỉnh lại mã đã được cấp phép bởi Quy tắc Chung. Bạn có thể sử dụng nó trên biểu đồ.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?
Appreciation of my work:

Premium Pivot Points Algo Indicator:

Bình luận

Hi, this is good indicator to know the underline stock performance against its Index.
But why setting is restricted to S&P?
I am from India & we are trading in NSE Nifty50 Index.
NSE NIFTY50 index is not there to compare its stocks against the benchmark.
Can you please edit the setting & open it for all Market & their Indices?
It will be a great help to all the traders.
Thank you. 👍 👍👍
Phản hồi
dman103 Tech_Milind
@Tech_Milind, Hey, Thanks, i agree, relative strength indicators are useful, regarding S&P restriction, the initial indicator was design to compare assets (stocks) to US indexes which is useful for me and i shared with you all, note taken, Like Script/Follow me to get notified, will do a redesign or make new script in the near future and include an option to add any symbol + will add more moving averages varieties + more features.
Phản hồi
@dman103, Thanks a lot. It will be great to all traders who are trading in different markets.
I know its really a painful job, but I appreciate your efforts for goodwill of community.
And yes, will following you.😊
Thanks. 👍👍👍
+1 Phản hồi
dman103 Tech_Milind
@Tech_Milind, Right, everything requires some job to get things done. i am happy to give and hopefully this will give you more winners, i have updated the script with option to add your own symbol to compare to + a few more moving averages.
Phản hồi
@dman103, Thanks a lot. Have tested just now. And working fantastic.
Appreciated your efforts. 👍👍👍👍
Once again, thanks a lot for giving this indicator very fast.
Thank you.
+1 Phản hồi
manis12345 Tech_Milind
@Tech_Milind, hey i just modified for NIFTY & Banknifty index using this script, just copy it in Pine editor and save.
study("Percentage Relative Strength")
other_symbol = input(title="Compare To", defval="NIFTY", options=)
enable_smoothing=input(title="Enable SMA smoothing",defval=true)
length=input(title="SMA Length",defval=7)
close_main_sec=security(other_symbol, timeframe.period, close)
c = close
current_percent = (c-c)/c * 100
other_percent = (close_main_sec-close_main_sec)/close_main_sec * 100
var val=0.0
if (enable_smoothing)
plot(val,color= val>=0 ? color.lime :,style=plot.style_columns,linewidth=5)
Phản hồi
Tech_Milind manis12345
@manis12345, Thank you Manis. For taking this pain. It is working absolutely fine.
Keep it up & thank you for helping. 👍👍👍
Phản hồi
Hi, Great tool ! Is there any way of changing what it compares it to? (Id like to use it to compare two different government bonds)
Phản hồi
Thanks a lot! It's just what I was looking for. Is it used to analyze the weekly chart?
Phản hồi
dman103 neiragonzalopsi
@neiragonzalopsi, yeah, you can use weekly chart or any timeframe.
Phản hồi