This functionality, pertaining to Relative Rotational Charts (RRC), was enhanced in January 2024.
RRC Scan Example #15: 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 - Q2 LEADERS]
List symbols where RSRATIO > 0 and RSMOMENTUM > 0
Add Column RSRATIO as RSRAT format 0.0000
Add Column RSMOMENTUM as RSMOM format 0.0000
Add Column RRCRANK
Sort on Column RRCRANK
Add Column SECTOR
'Plot Template abc
Set date to "15-Dec-2023"
Apply to IndexNames
[END]
[BEGIN RRC - IndexNames - Q3 WEAKENING]
List symbols where RSRATIO > 0 and RSMOMENTUM < 0
Add Column RSRATIO as RSRAT format 0.0000
Add Column RSMOMENTUM as RSMOM format 0.0000
Add Column RRCRANK
Sort on Column RRCRANK
Add Column SECTOR
'Plot Template abc
Set date to "15-Dec-2023"
Apply to IndexNames
[END]
[BEGIN RRC - IndexNames - Q4 LAGGARDS]
List symbols where RSRATIO < 0 and RSMOMENTUM < 0
Add Column RSRATIO as RSRAT format 0.0000
Add Column RSMOMENTUM as RSMOM format 0.0000
Add Column RRCRANK
Sort on Column RRCRANK
Add Column SECTOR
'Plot Template abc
Set date to "15-Dec-2023"
Apply to IndexNames
[END]
[BEGIN RRC - IndexNames - Q1 IMPROVING]
List symbols where RSRATIO < 0 and RSMOMENTUM > 0
Add Column RSRATIO as RSRAT format 0.0000
Add Column RSMOMENTUM as RSMOM format 0.0000
Add Column RRCRANK
Sort on Column RRCRANK
Add Column SECTOR
'Plot Template abc
Set date to "15-Dec-2023"
Apply to IndexNames
[END]
Purpose of the Scan
This scan aims to assess the relative strength and momentum of symbols within the NIFTYTOTAL Index compared to a benchmark index.
The goal is to categorize these symbols into the four quadrants of Relative Rotational Charts (RRC) based on their current positioning.
Leveraging the inherent capabilities of the RRC feature’s raw input functions, such as the RS Ratio and RS Momentum indicators, this scan code establishes the quadrant positioning and comprehensive RRC Rank for every symbol.
Let’s go!
Line 1
Set OptVar IndexNames = NIFTYLMID250, NIFTYSML250, NIFTYMIC250
Set OptVar IndexNames = NIFTYLMID250, NIFTYSML250, NIFTYMIC250
We are optimizing a factor named “IndexNames” using the “Set OptVar” function. This factor or variable acts as a stand-in in both the scan heading and the scan itself, to be replaced with three particular input values: “NIFTYLMID250”, “NIFTYLSML250”, and “NIFTYLMIC250”.
Feel free to choose an alternative term for “IndexNames,” but ensure a global replacement to guarantee the proper functioning of the scan.
Line 2 — First Block
[BEGIN RRC - IndexNames - Q2 LEADERS]
The optimized scanning process starts with the “BEGIN” command in this first block or section.
Following this, the phrase “RRC – IndexNames – Q2 LEADERS” after “BEGIN” becomes the precise title for the scan findings in the report.
“RRC – IndexNames – Q2 LEADERS” is designed to work like this: RRC – NIFTYMIC250 – Q2 LEADERS
Line 3
Q2 or Quadrant 2 — ‘Leaders’
List symbols where RSRATIO > 0 and RSMOMENTUM > 0
This command (“List symbols where”) prompts the scanning code to display a list of stock symbols based on specific criteria:
- Ensure that the RSRATIO is greater than 0 (“RSRATIO > 0”)
- Confirm that RSMOMENTUM surpasses 0 (“RSMOMENTUM > 0”)
This command prompt (“RSRATIO > 0” “and” “RSMOMENTUM > 0”) shows stocks in Quadrant 2, indicating they are “leaders” in relative strength. The “and” function is used to combine multiple conditions.
The “RSRATIO” function uses the RS-Ratio indicator, a crucial element in Relative Rotational charts (RRC). This indicator assesses a symbol’s trend strength compared to a benchmark index, such as the Nifty. A positive RS-Ratio signifies an upward trend and strength, while a negative ratio indicates a downward trend and weakness.
On the other hand, the “RSMOMENTUM” function activates the RS-Momentum indicator, which measures the rate of change in the RS-Ratio indicator. In simpler terms, it indicates whether the RS-Ratio is getting stronger or weaker, acting as a secondary indicator. RS-Momentum fluctuates around the 0 level, moving up and down.
Lines 4 through 8
Add Column RSRATIO as RSRAT format 0.0000
Add Column RSMOMENTUM as RSMOM format 0.0000
Add Column RRCRANK
Sort on Column RRCRANK
Add Column SECTOR
Use the “Add Column” function to generate four columns with the following labels:
- Label the first column as “RSRAT” to exhibit corresponding “RSRATIO” values.
- Create a column named “RSMOM” to display associated “RSMOMENTUM” values.
- Introduce another column labeled “RRCRank” to signify the status of “RRCRANK”.
- Create a column titled “SECTOR” to indicate the sector of qualifying symbols.
Apply the “format 0.0000” function to display values with up to four decimals.
Customize column titles according to your preferences.
The “RSRATIO” function utilizes the RS-Ratio indicator, a crucial element in Relative Rotational charts (RRC). It assesses a symbol’s trend strength compared to a benchmark index, like the Nifty. A positive RS-Ratio signals an uptrend and strength, while a negative ratio indicates a downtrend and weakness.
The “RSMOMENTUM” function activates the RS-Momentum indicator, measuring the rate of change in the RS-Ratio. In simpler terms, it shows whether the RS-Ratio is getting stronger or weaker, acting as a secondary indicator. RS-Momentum fluctuates around the 0 level, moving up and down.
The “RRCRANK” function ranks stocks by considering both the current RS-Ratio and RS-Momentum indicators.
Line 9
'Plot Template abc
The scan code line is turned off in the ChartAlert scanning engine, meaning it won’t run.
However, the “Plot Template” feature improves your charting experience. It enables you to swiftly apply a personalized template by clicking on a symbol in the scan results report.
The default template in the scan code is labeled “abc”, but you have the flexibility to rename it and select any template from your collection.
To create a template within ChartAlert, you can emulate these instructions:
- Begin by opening any chart of your choice.
- Proceed to plot 50-bar and 200-bar moving averages on the Candlestick chart type.
- Then, add the RS-Ratio/ RS-Momentum indicators via an indicator panel.
- Also add the RS Rating indicator via another indicator panel.
- 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 10
Set date to "15-Dec-2023"
The “Set date to” function directs the scan code to operate on a particular date. Input the date in double quotes (“”) using the dd-mmm-yyyy format.
Line 11
Apply to IndexNames
The “Apply to …” feature examines the “IndexNames” variable, representing three main groups: “NIFTYLMID250”, “NIFTYSML250” and “NIFTYMIC250”.
In simple terms, the scan checks all components in the NIFTYLMID250, NIFTYSML250, and NIFTYMIC250 Indices.
NIFTYLMID250 includes Nifty, Nifty Next 50 (LargeCaps), and Nifty Midcap 150 (Midcaps).
NIFTYSML250 comprises 250 SmallCap stocks, and NIFTYMIC250 includes 250 MicroCap stocks.
Line 12
[END]
The optimized scan code concludes with an “END” statement.
Lines 13 through 23 — Second Block
Q3 or Quadrant 3 — ‘Weakening’
[BEGIN RRC - IndexNames - Q3 WEAKENING]
List symbols where RSRATIO > 0 and RSMOMENTUM < 0
Add Column RSRATIO as RSRAT format 0.0000
Add Column RSMOMENTUM as RSMOM format 0.0000
Add Column RRCRANK
Sort on Column RRCRANK
Add Column SECTOR
'Plot Template abc
Set date to "15-Dec-2023"
Apply to IndexNames
[END]
The only difference between this second block of scan code and the first block/section is Line #2.
The command line (“List symbols where”) prompts the scanning code to display a list of stock symbols based on specific criteria:
- Ensure that the RSRATIO is greater than 0 (“RSRATIO > 0”)
- Confirm that RSMOMENTUM is below 0 (“RSMOMENTUM < 0”)
This scan code line (“RSRATIO > 0” “and” “RSMOMENTUM < 0”) shows stocks in Quadrant 3, indicating they are “outperformers but with weakening momentum” in relative strength.
The “RSRATIO” function uses the RS-Ratio indicator, a crucial element in Relative Rotational charts (RRC). This indicator assesses a symbol’s trend strength compared to a benchmark index, such as the Nifty. A positive RS-Ratio signifies an upward trend and strength, while a negative ratio indicates a downward trend and weakness.
On the other hand, the “RSMOMENTUM” function activates the RS-Momentum indicator, which measures the rate of change in the RS-Ratio indicator. In simpler terms, it indicates whether the RS-Ratio is getting stronger or weaker, acting as a secondary indicator. RS-Momentum fluctuates around the 0 level, moving up and down.
Lines 24 through 34 — Third Block
Q4 or Quadrant 4 — ‘Laggards’
[BEGIN RRC - IndexNames - Q4 LAGGARDS]
List symbols where RSRATIO < 0 and RSMOMENTUM < 0
Add Column RSRATIO as RSRAT format 0.0000
Add Column RSMOMENTUM as RSMOM format 0.0000
Add Column RRCRANK
Sort on Column RRCRANK
Add Column SECTOR
'Plot Template abc
Set date to "15-Dec-2023"
Apply to IndexNames
[END]
The only difference between this third block of scan code and the first block/section or the second block/section is Line #2.
The command line (“List symbols where”) prompts the scanning code to display a list of stock symbols based on specific criteria:
- Ensure that the RSRATIO is below 0 (“RSRATIO < 0”)
- Confirm that RSMOMENTUM is also below 0 (“RSMOMENTUM < 0”)
This scan code line (“RSRATIO < 0” “and” “RSMOMENTUM < 0”) shows stocks in Quadrant 4, indicating they are “laggards”, that is, underperformers with weak momentum in terms of relative strength.
The “RSRATIO” function uses the RS-Ratio indicator, a crucial element in Relative Rotational charts (RRC). This indicator assesses a symbol’s trend strength compared to a benchmark index, such as the Nifty. A positive RS-Ratio signifies an upward trend and strength, while a negative ratio indicates a downward trend and weakness.
On the other hand, the “RSMOMENTUM” function activates the RS-Momentum indicator, which measures the rate of change in the RS-Ratio indicator. In simpler terms, it indicates whether the RS-Ratio is getting stronger or weaker, acting as a secondary indicator. RS-Momentum fluctuates around the 0 level, moving up and down.
Lines 35 through 45 — Fourth Block
Q1 or Quadrant 1 — ‘Improving’
[BEGIN RRC - IndexNames - Q1 IMPROVING]
List symbols where RSRATIO < 0 and RSMOMENTUM > 0
Add Column RSRATIO as RSRAT format 0.0000
Add Column RSMOMENTUM as RSMOM format 0.0000
Add Column RRCRANK
Sort on Column RRCRANK
Add Column SECTOR
'Plot Template abc
Set date to "15-Dec-2023"
Apply to IndexNames
[END]
The only difference between this fourth and last block of scan code and the first block or second block or third block/section is Line #2.
The command line (“List symbols where”) prompts the scanning code to display a list of stock symbols based on specific criteria:
- Ensure that the RSRATIO is below 0 (“RSRATIO < 0”)
- Confirm that RSMOMENTUM is greater than 0 (“RSMOMENTUM > 0”)
This scan code line (“RSRATIO < 0” “and” “RSMOMENTUM > 0”) shows stocks in Quadrant 1, indicating they are “underperformers with improving momentum” in terms of relative strength.
The “RSRATIO” function uses the RS-Ratio indicator, a crucial element in Relative Rotational charts (RRC). This indicator assesses a symbol’s trend strength compared to a benchmark index, such as the Nifty. A positive RS-Ratio signifies an upward trend and strength, while a negative ratio indicates a downward trend and weakness.
On the other hand, the “RSMOMENTUM” function activates the RS-Momentum indicator, which measures the rate of change in the RS-Ratio indicator. In simpler terms, it indicates whether the RS-Ratio is getting stronger or weaker, acting as a secondary indicator. RS-Momentum fluctuates around the 0 level, moving up and down.
The Scan Report in ChartAlert
Introduce a variation to incorporate RS Ratings into this scan
Add Column RSRATING(NIFTY) as RsRating
Sort on Column RsRating desc
Add Column RSRATINGST(NIFTY) as RsRatingST
Integrate the provided code block into each of the four scan code blocks above to retrieve RS Ratings.
Use the following instructions to instruct the scan code to create three additional columns through the “Add Column” function:
1. Include a column named “RsRating” to present the corresponding “RSRATING” values, benchmarked against “(NIFTY)”.
2. Include another column named “RsRatingST” to exhibit the associated “RSRATINGST” (short-term RS Rating) values, benchmarked against “(NIFTY)”.
Employ the “Sort on Column” function to organize the “RsRating” column either in ascending or descending order. Specifically, arrange the “RsRating” column in descending order (“desc”).
Feel free to personalize these column titles based on your preferences.