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 ( )
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.
Added more moving averages (EMA, RMA and WMA)
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 đồ.
Premium Pivot Points Algo Indicator: https://www.tradingview.com/script/LFBaHNuA-Pivot-Points-Algo/
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. 👍 👍👍
I know its really a painful job, but I appreciate your efforts for goodwill of community.
And yes, will following you.😊
Appreciated your efforts. 👍👍👍👍
Once again, thanks a lot for giving this indicator very fast.
study("Percentage Relative Strength")
other_symbol = input(title="Compare To", defval="NIFTY", options=)
enable_smoothing=input(title="Enable SMA smoothing",defval=true)
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
plot(val,color= val>=0 ? color.lime : color.red,style=plot.style_columns,linewidth=5)
Keep it up & thank you for helping. 👍👍👍