OPEN-SOURCE SCRIPT

Relative Rating Index (RRI)

The technical rating is one of the most perfect indicators. The reason is that this indicator is based on a majority vote of multiple indicators. It is logical that the judgment based on a majority vote of multiple indicators would not be inferior to the judgment made using only a single indicator. However, just as any indicator has its shortcomings, the technical rating also has weaknesses. The most significant issue is that it primarily provides only a momentary evaluation of the current situation.

Let's consider this in more detail. In the technical rating, an evaluation of 1.0 by the majority vote of indicators is considered a strong buy. However, in the market, there are naturally varying levels of strength. For example, would a market that only once reached an evaluation of 1.0 within a given period be considered the same as a market that consistently maintains an evaluation of 1.0? The latter clearly shows a stronger trend, but the technical rating does not provide an objective criterion for such differentiation. While it is possible to check the histogram to see how long the buy or sell rating has continued, there is no objective standard for judgment.

The indicator I have created this time compensates for this weakness by using the concept of RSI. As is well known, RSI is an indicator that shows the momentum of the market. RSI typically calculates the strength of the price increase during a 14-period by dividing the total upward movement by the total movement range. Similarly, I thought that if we divide the positive evaluations of the technical rating during a given period by the total evaluations, we could calculate the "momentum of the technical rating," which shows how often positive ratings have appeared during that period.

Below is the calculation formula.

1. Setting the Evaluation Period
Decide the period to calculate (e.g., 14 periods). This is denoted as `n`.

2. Total Positive Ratings of the Technical Rating
Calculate the total number of times the technical rating is evaluated as "strong buy" or "buy" during each period. This is called `positive_sum`.

3. Total Ratings
Count the total number of ratings (including buy, sell, and neutral) during the period. This is called `total_sum`.

4. Calculating the Upward Strength
Divide `positive_sum` by `total_sum` to calculate the ratio of positive ratings in the technical rating. This is called the "ratio of positive ratings."

The ratio of positive ratings, denoted as `P`, is calculated as follows:

P = positive_sum / total_sum

5. Calculating RRI
Following the calculation method of RSI, RRI is calculated by the following formula:

RRI = 100 - (100 / (1 + (P / (1 - P))))

As you can see, the calculation method is similar to that of RSI. Therefore, initially, I intended to name this indicator the Technical Rating RSI. However, RSI calculates based on the difference between the previous bar's price and the current bar's price, whereas this indicator calculates by summing the values of the technical ratings themselves. In the case of prices, if the difference between bars is zero, it indicates a flat market, but in the case of technical rating values, if 1.0 continues for two consecutive periods, it signifies an extremely strong buy rather than a flat market. For this reason, I decided that the calculation method could no longer be considered the same as the traditional RSI, and to avoid confusion, I chose to give this new indicator the name "Relative Rating Index" (RRI), as it provides a new type of numerical evaluation.

The information provided by this indicator is simple. When RRI exceeds 50, it means that more than 50% of the technical rating evaluations during the set period (I recommend 50 periods, but please determine the optimal value based on your timeframe) are buy evaluations. However, since there may be many false signals around exactly 50, I define it as buy-dominant when the value exceeds 60 and sell-dominant when it falls below 40. Additionally, if the graph itself is rising, it indicates that the buying momentum is strengthening, and if it is falling, it indicates that the selling momentum is increasing.

Furthermore, there are lines drawn at 90 and 10, but please note that unlike RSI, these do not indicate overbought or oversold conditions. When RRI exceeds 90, it means that over 90% of the technical rating evaluations during the specified period are buy evaluations, indicating an ongoing extremely strong buy trend. Until the RRI graph turns downward and falls below 90, it should rather be considered a buying opportunity.

With this new indicator, the technical rating becomes an indicator with depth, providing evaluations not only for the moment but over a specified period. I hope you find it helpful in your market analysis.
Relative Strength Index (RSI)wilder

סקריפט קוד פתוח

ברוח TradingView אמיתית, מחבר הסקריפט הזה פרסם אותו בקוד פתוח, כך שסוחרים יוכלו להבין ולאמת אותו. כל הכבוד למחבר! אתה יכול להשתמש בו בחינם, אבל השימוש החוזר בקוד זה בפרסום כפוף לכללי הבית. אתה יכול להכניס אותו למועדפים כדי להשתמש בו בגרף.

רוצה להשתמש בסקריפ זה בגרף?

כתב ויתור