This functionality was introduced in October 2023 (Version 23.10.1)
Below is an illustration of an optimized scan that can be created using the Advanced Scanner in ChartAlert.
This one enhanced scan, wherein multiple parameters/ variables can now accept multiple values/ inputs for scanning, now replaces the need for writing atleast four separate scans as was required in the previous versions of ChartAlert.
ATTN: This scan is similar to the earlier scan (refer to Example 7: Single Parameter Multiple Inputs; Weekly Price Performance), with the exception of yearly price performance being scanned, and the final line (“Set report type to SUMMARY”).
[BEGIN 1yrPP chg1-chg2] Set OptVar chg1 = 0, 10, 20, 50 Set OptVar chg2 = 10, 20, 50, 100 List symbols where Chg%(cl, cl 1 year ago) >= chg1 AND Chg%(cl, cl 1 year ago) < chg2 Add Column Chg%(cl, cl 1 year ago) as chg% Apply to NIFTYTOTAL [END] Set report type to SUMMARY
Below is a breakdown of the scan presented in a step-by-step manner.
Purpose of the Scan
- To generate a list of symbols where the latest Close, when compared to the Close 1-year ago, has gained between 0% and 100%, and further categorize the scan results into four groups such as 0%-10%, 10%-20%, 20%-50% and 50%-100%.
- To display the 1-year percentage change based on the latest closing price in the scan results report.
- To scan the components of the following index: NIFTYTOTAL
- To list the scan results as a summary report: the scan output will be listed as the number of qualifying symbols under each NSE Index available in ChartAlert.
[BEGIN 1yrPP chg1-chg2]
The optimized scan procedure starts with a “BEGIN” command.
The text “1yrPP chg1-chg2” that comes after the “BEGIN” command serves as the designated heading for the scan results that will be showcased in the scan report.
See Line 2 and 3 below to know how how “chg1” and “chg2” will get used in the scan.
“1yrPP chg1-chg2” is designed to work like this: 1yrPP 0-10 (%)
Line 2 and 3
Set OptVar chg1 = 0, 10, 20, 50 Set OptVar chg2 = 10, 20, 50, 100
We are configuring or setting multiple optimized variables (“Set OptVar”) that will be referred to as “chg1” and “chg2”.
The variable “chg1” will function as a temporary marker or placeholder within the scan heading and will be substituted with terms like “0,” “10,” “20” and “50” in the scan report.
Similarly, the variable “chg2” will also function as a temporary marker or placeholder within the scan heading and will be substituted with terms like “10,” “20,” “50” and “100” in the scan report.
The number of inputs each variable can accept should be identical . . . in the current scan context, both the variables “chg1” and “chg2” accept four inputs each.
You can customize both the terms “chg1” and “chg2” with anything of your choosing . . . Just remember to globally replace them for the scan to work.
See Line 3 below to know more on how “chg1” and “chg2” get used in the scan.
List symbols where Chg%(cl, cl 1 year ago) >= chg1 AND Chg%(cl, cl 1 year ago) < chg2
This scan has two conditions, “Chg%(cl, cl 1 year ago) >= chg1” and “Chg%(cl, cl 1 year ago) < chg2”, and it will generate a list of symbols where both the conditions have been met.
Thus, this scan will look for symbols where the change in close (“cl”) over the past 1-year (“cl 1 year ago”) in percentage terms is greater than “chg1” percent, AND where the change in close (“cl”) over the past 1-year (“cl 1 year ago”) in percentage terms is less than “chg2” percent.
The parameters/ variables “chg1” and “chg2” will encompass four settings each.
In essence, upon execution, this scanning process will sequentially use “0-10,” “10-20,” “20-50” and “50-100” as input to look for symbols where the above mentioned specific conditions have been met.
Add Column Chg%(cl, cl 1 year ago) as chg%
In this scan, the function “Add Column…” serves the purpose of displaying additional columns within a scan report.
In this case, the scanning report will display one column, the change in close over the past 1-year in percentage terms, and the column will be titled “chg%”.
Apply to NIFTYTOTAL
The “Apply to…” function applies the scanning process to the NIFTYTOTAL Index, and the scan will effectively examine all the constituent elements of NIFTYTOTAL.
The optimized scan code concludes with an “END” statement.
Set report type to SUMMARY
The functionality labeled as “Set report type to…” empowers users to determine the manner in which the scan results will be showcased.
Choosing the “SUMMARY” option presents the scan results in a summarized/ concise report format.
This SUMMARY report categorizes and lists the eligible “number of symbols” under each official NSE Index present in ChartAlert . . . If you wish to explore further, you can click on the mentioned “number of symbols” to view the specific list of symbols identified by that NSE Index.