Fred6724

RS Rating

Fred6724 업데이트됨   
Hello everyone.

The RS Rating (or Relative Strenght Rating) is a metric that tracks a stock's price performance relative to the rest of the market. Specifically, it looks at a stock's relative strength over the last 52 weeks.
It allows you to identify at a glance stocks that are outperforming the market and may be poised for further gains.
Designed for break-out traders, trend follower, value investors, the RS Rating can help you identify promising opportunities and make informed investment decisions.

The Rating stands as follow:
- From 1 (worst) to 99 (best)
- 99 rating means the stock is outperforming 99% of all stocks in terms of relative share price performance over the last 52 weeks.

The RS Rating is accompanied by the RS line which is a representation of the progress of the asset against the comparative symbol. (Here SP500)

Of course this script is inspired by the IBD rating system.
The results may be equivalent but it is not guaranteed.
This indicator proposes a scoring system in the style of the one proposed by IBD.
Indeed for an optimal result, it would be necessary to compare the relative performance of all actions, which is not yet possible on PineScript.

Here is the formula for calculating the score:

RS Score = 40% * P3 + 20% * P6 + 20% * P9 + 20% * P12
With
P3 = Performance over the last 3 months
P6 = Performance over the last 6 months
P9 = Performance over the last 9 months
P12 = Performance over the last 12 months

There is no equivalent solution for the moment on TradingView.
The rating score will only appear on the daily timeframe.

For now it's my pleasure to share!
릴리즈 노트:
- Now the color is the same than IBD's RS Rating and Line
릴리즈 노트:
- Corrected a bug that was causing the labels to be displayed several times in case a new candle opened or in replay mode
릴리즈 노트:
- The input of the comparative ticker is now taken into account for the RS Rating calculation
릴리즈 노트:
- Now display a result different than NaN for IPO stocks
릴리즈 노트:
Added the blue dot function, now a blue dot can appear on the line if:
- RS at New Highs
- RS at New Highs Before Price
- Historical RS at New Highs
- Historical RS at New Highs Before Price
릴리즈 노트:
- Improved display speed by adding "max_bars_back = 253" the script was counting all the bars of the graph while it was not necessary
To benefit from the new version, remove the script, refresh your chart and add it back :)
릴리즈 노트:
- Adjusted display offset
릴리즈 노트:
- Modified SPX Value input
- Modified offset display
- Added a limitation for the 3rd method of calculaton of the RS Rating
- Now low score should be more accurate
릴리즈 노트:
- Replaced the "value of the comparative ticker" to enter by an offset system. It does the same thing but will generate less questions. The previous offset system was not that clear
릴리즈 노트:
- Removed the part with float variable to handle New High and New High Before Price
- Added Optional New Low dots
- Added Optional 21 EMA on everytime frame except in Weekly Timeframe with 10 SMA, on the RS Line
- Possible to color the area between the MA and the RS Line
- Arranged inputs
릴리즈 노트:
- Updated the max value of the offset to be 2000 instead of 300, this way you can display correctly with the NIFTY as a reference with for example an offset of 320
릴리즈 노트:
- Simplified the code regarding Ma on RS Line
- Added Historical New Highs/Lows as a default value
릴리즈 노트:
I'm delighted to announce a major update to the RS Rating indicator, which should bring you a much more effective scoring system.
My studies (based on a short sample) show an average deviation of +/- 3 to 5 points for the TradingView indicator and +/- 4 points for the GitHub project, compared with the IBD/MarketSmith RS Rating.
The biggest deltas are in the 30-60 range.
The new flagship feature of this update is TradingView's introduction of the 'request.seed()' function!
My warmest thanks to TradingView for giving me the opportunity and the tools to share this script.
Thanks to this function, it has been possible to offer a dynamic environment that simulates the relative performance of some 6,600 stocks on the US market.

The GitHub-managed part is publicly accessible via 'github.com/Fred6725/relative-strength'
More precisly in 'rs_ranking.py' for extracting the needed data and in workflows/output.yml for the auto update.

You can also use the daily updated 'rs_stocks.csv' of GitHub to quickly access the RS Ratings via Google Sheets!

I sincerely hope you will appreciate the time and effort I've put into making these improvements!

This solution is only available for the US market.
릴리즈 노트:
- Modified Graph presentation
릴리즈 노트:
- Modified the display in replay mode from 'RS Rating -1' to 'RS'.
릴리즈 노트:
- Changed default value of RS New High-Low to 252 bars and 52 We when the default value of 252 is set.
If you change the value for example to 40, this will be 40 Day in Daily, 40 We in Weekly etc.
- Corrected pilling on labels for non-historical New High-Low.
- Changes default value of New High-Low label size
- Added an input to modify New High-Low label value
릴리즈 노트:
- Modified labels to tiny
릴리즈 노트:
- Changes lookback default value to 250 as it seems that this is the default value of MarketSmith
릴리즈 노트:
- Adapted the offset display for Sectors and Indices
릴리즈 노트:
- Adjusted Label Position
릴리즈 노트:
- Added Default Blue Dot New High
릴리즈 노트:
- Now we can display the rating only, eg: for smartphone display
릴리즈 노트:
- In this update, I propose to use an option to view the historical RS Rating. This method is an approximation, as the performance environment of US equities varies over time, whereas the historical RS Rating is calculated with fixed values. However, this option can be of interest when studying past setups, and can provide relevant indications.
Thank you @Otteri, I had the idea thanks to you!
릴리즈 노트:
- We can now add a second SMA/EMA on the RS Line.
- We can now modify the Line Curve by the ticker of our choice.
(I choosed to put back this option despite the high number of questions it generated because of the value of the comparative symbole to enter in order to calculate the cross product.)

오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?