This functionality, pertaining to Relative Strength Rating, will be introduced in January 2024.
RS Rating Scan Example #1: Identify symbols based on relative strength ratings in percentile terms
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 RSRATING(NIFTY) as RsRating
Sort on Column RsRating desc 'limit 25%
Add Column RSRATINGST(NIFTY) as RsRatingST
Add Column SECTOR
'Plot Template abc
Set date to "15-Dec-2023"
Apply to IndexNames
[END]
Purpose of the Scan
This scan aims to identify symbols within the NIFTYTOTAL Index by assessing their relative strength ratings.
The goal is to pinpoint a stock’s performance position within a group of reviewed stocks. The RS Rating, measured in percentile terms, provides insights into whether a stock falls within the lower 50% or top 10% of performers.
In pursuit of this objective, filtering functions linked to RS Rating are employed, and the approach involves ranking stocks in percentile terms daily to assess their performance in comparison to peers and a designated benchmark index within the stock portfolio.
Let’s go!
Line 1
Set OptVar IndexNames = NIFTYLMID250, NIFTYSML250, NIFTYMIC250
We’re creating an optimized variable named “IndexNames” using the “Set OptVar” function. This variable acts as a placeholder in both the scan heading and the scan itself. It will be replaced with three specific input values: “NIFTYLMID250”, “NIFTYLSML250”, and “NIFTYLMIC250”.
Feel free to choose any term for “IndexNames”, but ensure you replace it globally for the scan to function properly.
Line 2
[BEGIN RRC - IndexNames]
The optimized scan procedure starts with a “BEGIN” command.
Subsequently, the text “RRC – IndexNames” following the “BEGIN” command acts as the specific heading for the scan results presented in the report.
“RRC – IndexNames” is designed to work like this: RRC – NIFTYSML250
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”) instructs the scanning code to display a compilation of stock symbols meeting specific criteria:
- Closing price > Rs.100 (“C > 100”)
- Daily traded volume > 25,000 (“VOL > 25000”)
- Number of daily trades > 1000 (“TRADES > 1000”)
- Satisfying either of the two conditions: RS Rating > 75 (“RSRATING(NIFTY) > 75”) or Short-term RS Rating > 80 (“RSRATINGST(NIFTY) > 80”)
The “RSRATING(NIFTY)” function computes 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, again based on NIFTY as the benchmark index.
Notably, RS Rating assesses one-year trends, emphasizing recent data akin to the exponential moving average, whereas Short-term RS Rating evaluates trailing quarterly trends.
The “and” function combines multiple conditions, while the “or” function in Line #7 facilitates an either/or scenario. This scan employs a nested “or” condition within a broader “and” condition.
Note: The filters provided are for illustration purposes. If you deem these filters unnecessary, you can execute the scan without these filters.
Lines 8 through 11
Add Column RSRATING(NIFTY) as RsRating
Sort on Column RsRating desc 'limit 25%
Add Column RSRATINGST(NIFTY) as RsRatingST
Add Column SECTOR
Lines 8, 10 and 11 instruct the scan to generate three columns using the “Add Column” function:
- Include a column labeled “RsRating” to showcase the corresponding “RSRATING” values based on “(NIFTY)” as the benchmark index.
- Include another column labeled “RsRatingST” to display the associated “RSRATINGST” (short-term RS Rating) values based on “(NIFTY)” as the benchmark index.
- Introduce a column named “SECTOR” to display the sector of qualifying symbols.
The “Sort on Column” function arranges a column in either ascending or descending order. Specifically, the “RsRating” column will be arranged in descending order (“desc”). Enabling the disabled section (‘) of Line 9 will restrict the results to the top 25% symbols (“limit 25%”).
Feel free to customize these column titles according to your preferences.
Line 12
'Plot Template abc
The scan code line is deactivated or commented out, so it won’t be executed by the ChartAlert scanning engine.
However, the “Plot Template” feature improves your charting experience. It lets you easily apply a personalized template when you click on a symbol in the scan results report.
The suggested template in the scan code is named “abc”, but you can name it as you prefer 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 13
Set date to "15-Dec-2023"
The “Set date to” function instructs the scan code to execute based on the specified date, which must be entered within double quotes (“”) and in the dd-mmm-yyyy format.
Line 14
Apply to IndexNames
The “Apply to …” function scans the variable “IndexNames”.
This variable, “IndexNames”, is optimized to represent three main segments: “NIFTYLMID250”, “NIFTYLSML250”, and “NIFTYLMIC250”.
To clarify, the scan examines all elements within the NIFTYLMID250, NIFTYSML250, and NIFTYMIC250 Indices.
The NIFTYLMID250 Index combines Nifty and Nifty Next 50 (LargeCaps) with Nifty Midcap 150 (Midcaps).
The NIFTYSML250 Index includes 250 SmallCap stocks, while the NIFTYMIC250 Index comprises 250 MicroCap stocks.
Line 15
[END]
The optimized scan code concludes with an “END” statement.
The Scan Report in ChartAlert
