RRC Stock Screener – Example 14: Identify symbols based on “RS Rating” and also rank them based on relative strength and relative momentum (“RRC Rank”)

The RRC Rank uses RS Ratio and RS Momentum indicators to assess a stock’s relative strength against a benchmark index; the RS Rating, a numerical percentile score over the last 12 months, helps investors identify top-performing stocks with 99 indicating the highest relative strength, enabling consistent market outperformance

6 minutes

This functionality, pertaining to Relative Rotational Charts (RRC), was enhanced in January 2024.


RRC Scan Example #14: Identify symbols based on “RS Rating” and also rank them based on RS Ratio and RS Momentum (“RRC Rank”)

Set OptVar IndexNames = NIFTYLMID250, NIFTYSML250, NIFTYMIC250

[BEGIN RRC - IndexNames]

List symbols where
C > 100
and VOL > 25000
and TRADES > 1000
and (RSRATING(NIFTY) > 75 or RSRATINGST(NIFTY) > 80)

Add Column RSRATIO as RSRAT format 0.0000
Add Column RSMOMENTUM as RSMOM format 0.0000
Add Column RRCRANK as RRCRank
Add Column SECTOR

Add Column RSRATING(NIFTY) as RsRating
Sort on Column RsRating desc 'limit 25%
Add Column RSRATINGST(NIFTY) as RsRatingST

'Plot Template abc

Set date to "15-Dec-2023"

Apply to IndexNames

[END]

Purpose of the Scan

The purpose of this scan is to focus on evaluating the NIFTYTOTAL Index component stocks with specific objectives:

  1. Assess symbols by employing relative strength and momentum indicators within the RRC feature in comparison to a benchmark index, resulting in a systematic ranking of symbols.
  2. Identify symbols based on their relative strength percentile ratings in relation to a benchmark index to assist in gauging a stock’s performance within the portfolio.

 This scan effectively combines the purposes outlined in RRC stock screener scan example 13 and RS Rating stock screener scan example 1, enhancing the overall analysis. Additionally, filtering functions linked to RS Rating contribute to the comprehensive evaluation.

Achieving objectives involves using the Relative Rotational charts’ raw input functions to ascertain the RRC Rank. Additionally, the daily assessment of a stock’s performance relative to both its peers and a benchmark index, known as the RS Rating, contributes to meeting these goals.

Let’s go!



Line 1

Set OptVar IndexNames = NIFTYLMID250, NIFTYSML250, NIFTYMIC250

We’re optimizing a variable called “IndexNames” through the “Set OptVar” function. This variable serves as a placeholder in both the scan heading and the scan itself, to be substituted with three specific input values: “NIFTYLMID250”, “NIFTYLSML250”, and “NIFTYLMIC250”.

You can pick any term for “IndexNames”, but make sure to replace it globally to ensure the scan works correctly.


Line 2

[BEGIN RRC - IndexNames]

The optimized scan procedure begins with the “BEGIN” command.

Subsequently, the term “RRC – IndexNames” that comes after “BEGIN” serves as the specific title for the scan results in the report.


Lines 3 through 7

List symbols where 
C > 100
and VOL > 25000
and TRADES > 1000
and (RSRATING(NIFTY) > 75 or RSRATINGST(NIFTY) > 80)

The first line (“List symbols where”) directs the scanning code to show a list of stock symbols that meet specific criteria:

  1. Closing price must be higher than Rs.100 (“C > 100”)
  2. Daily traded volume should exceed 25,000 (“VOL > 25000”)
  3. Number of daily trades must be more than 1000 (“TRADES > 1000”)
  4. Stocks should meet either of these conditions: RS Rating should be over 75 (“RSRATING(NIFTY) > 75”), or Short-term RS Rating should be over 80 (“RSRATINGST(NIFTY) > 80”)

The “RSRATING(NIFTY)” function calculates the Relative Strength Rating for NIFTYTOTAL stocks using NIFTY as the benchmark index. Simultaneously, the “RSRATINGST(NIFTY)” function computes the Short-term Relative Strength Rating for NIFTYTOTAL stocks, based on NIFTY as the benchmark index.

The “and” function combines multiple conditions, and the “or” function in Line #7 enables an either/or scenario. This scan uses a nested “or” condition within a broader “and” condition.

Note: The provided filters are for illustration purposes. If you find these filters unnecessary, you can run the scan without them.


Lines 8 through 11

Add Column RSRATIO as RSRAT format 0.0000
Add Column RSMOMENTUM as RSMOM format 0.0000
Add Column RRCRANK as RRCRank
Add Column SECTOR

Specify the scan to create four columns using the “Add Column” function:

  1. Label one column as “RSRAT” to display corresponding “RSRATIO” values.
  2. Create a column called “RSMOM” to show associated “RSMOMENTUM” values.
  3. Add another column named “RRCRank” to indicate the status of “RRCRANK”.
  4. Introduce a column titled “SECTOR” to present the sector of qualifying symbols.

Use the “format 0.0000” function to present values with up to four decimals.

Feel free to personalize these column titles based on your preferences.


Lines 12 through 14

Add Column RSRATING(NIFTY) as RsRating 
Sort on Column RsRating desc 'limit 25%
Add Column RSRATINGST(NIFTY) as RsRatingST

Lines 12 and 14 instruct the scan to create three columns using the “Add Column” function:

  1. Add a column named “RsRating” to display the corresponding “RSRATING” values based on the benchmark index “(NIFTY)”.
  2. Introduce another column named “RsRatingST” to show the related short-term RS Rating values (“RSRATINGST”) based on the benchmark index “(NIFTY)”.

The “Sort on Column” function organizes a column in either ascending or descending order. Specifically, the “RsRating” column will be organized in descending order (“desc”). Activating the disabled section () of Line 13 will limit the results to the top 25% symbols (“limit 25%”).

Feel free to customize these column titles based on your preferences.


Line 15

'Plot Template abc

The scan code line is turned off in the ChartAlert scanning engine, meaning it won’t run.

Yet, the “Plot Template” function enhances your charting. It allows you to quickly use a custom template when you click on a symbol in the scan results report.

The suggested template in the scan code is called “abc”, but you’re free to name it as you like and choose any template from your collection.


To create a template within ChartAlert, you can emulate these instructions:

  1. Begin by opening any chart of your choice.
  2. Proceed to plot 50-bar and 200-bar moving averages on the Candlestick chart type.
  3. Then, add the RS-Ratio/ RS-Momentum indicators via an indicator panel.
  4. Also add the RS Rating indicator via another indicator panel.
  5. Finally, save this template as “RRC and RS Rating”, but remember that you are at liberty to select any name that aligns with your requirements.

These steps will ensure a seamless and personalized charting experience in ChartAlert.


Line 16

Set date to "15-Dec-2023"

The “Set date to” function instructs the scan code to run on a specific date. Enter the date in double quotes (“”) using the dd-mmm-yyyy format.


Line 17

Apply to IndexNames

The “Apply to …” function checks the “IndexNames” variable, which is designed to represent three main groups: “NIFTYLMID250”, “NIFTYSML250” and “NIFTYMIC250”.

NIFTYLMID250 combines Nifty, Nifty Next 50 (LargeCaps), and Nifty Midcap 150 (Midcaps).

NIFTYSML250 consists of 250 SmallCap stocks, while NIFTYMIC250 comprises 250 MicroCap stocks.


Line 18

[END]

The optimized scan code concludes with an “END” statement.


The Scan Report in ChartAlert

Discover more from ChartAlert®

Subscribe now to keep reading and get access to the full archive.

Continue reading