TradingView
atlas54000
1 Th09 2022 12:59

Sector Relative Strength 

SPDR S&P 500 ETF TRUSTArca

Mô tả

Custom version of my previous scanner built for S&P sectors

Phát hành các Ghi chú

The update introduce a completly revamped script, focused on the S&P sectors. This new version is less customizable but easier to use and more reliable : you can now load it on any timeframe and you're less likely to encounter an error message.
However if you want to go back to the previous version, you can get the old code here : https://pastebin.com/2wRqTpP3

The script can still display up to 5 columns of your choice and rank the sector using any ot these columns :
  • 1 Price change
  • 1 Relative volume
  • 3 different Relative Strength


Note:
  • The first relative strength column, price change and relative volume are always using the 5 minute data and you can't change that. However you are free to change the period of the Relative strength and the number of candles used to calculate the price change and the relative volume.
  • The second and third relative strength are completly customizable
  • The formula used for the relative strength use the ATR but doesn't include volume
  • The relative strength value for SPY correspond to the change divided by the ATR, this value is then used to calculate the Rs of each sector (sector_change - ((spy_change / spy_atr) * sector_atr)) / sector_atr
  • Concerning the colors of the relative volume, SPY RV turns green when above 1, but the sector RV are turning green when above the SPY RV

Phát hành các Ghi chú

Added a minor change
Bình luận
user1928374560XYZ
can't get to load
user1928374560XYZ
@user1928374560XYZ, memory limits exceeded
atlas54000
@user1928374560XYZ, Hello, i'm sorry i didn't see the notification, I never had this issue using this script, are you using the default parameters ?
unityblue
@atlas54000, still a problem - not functional.
I tried fiddling with a few of the columns off, made no difference. It says it's using 1.3x the allowable memory.
TV is famous for adding limitations, so perhaps you have a fancy subscription, etc.
but my guess is that some kind of array is too large.... etc
tradingview.com/support/solutions/43000590233-i-see-memory-limits-exceeded-the-study-allocates-x-times-more-than-allowed-error/
Fred6724
@user1928374560XYZ, Same problem :(
jonster555
This is really awesome, nice work. Would it be possible to to modify RS 2 and RS 3 to have anchor inputs, instead of look back period? that would be super useful to see sector money flow after key events like FOMC, etc.
Thêm nữa