This functionality will be introduced in September 2023 (Version 23.9.1)
Below is an illustration of an optimized scan that can be created using the Advanced Scanner in ChartAlert.
This one enhanced scan now replaces the need for writing four separate scans as was required in the previous versions of ChartAlert.
[BEGIN close>superT(10,3) - IndexNames] Set OptVar IndexNames = Nifty, Nifty100, Nifty200, Nifty500 List symbols where c crossed above supertrend(10,3) Add Column Close Add Column SUPERTREND(10,3) chart Apply to IndexNames [END]
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 has just crossed above the SuperTrend indicator.
- To display the values of the latest Close and the SuperTrend indicator in the scan results report.
- To scan the components of the following indices: Nifty, Nifty100, Nifty200 and Nifty500, although Nifty, Nifty100 and Nifty200 are subsets of Nifty500.
[BEGIN close>superT(10,3) - IndexNames]
The optimized scan procedure starts with a “BEGIN” command.
The text “close>superT(10,3) – IndexNames” that comes after the “BEGIN” command serves as the designated heading for the scan results that will be showcased in the scan report.
The term “IndexNames” functions as a temporary marker or placeholder within the scan heading and will be substituted with terms like “Nifty,” “Nifty100,” “Nifty200,” or “Nifty500” in the scan report.
You can customize the term “IndexNames” with anything of your choosing.
“close>superT(10,3) – IndexNames” is designed to work like this: close>superT(10,3) – Nifty500
Set OptVar IndexNames = Nifty, Nifty100, Nifty200, Nifty500
We are configuring or setting an optimized variable (“Set OptVar” ) that will be referred to as “IndexNames”.
Remember, you can customize the term “IndexNames” with anything of your choosing.
This variable “IndexNames” will encompass four distinct segments, namely “Nifty,” “Nifty100,” “Nifty200” and “Nifty500”.
In essence, upon execution, this scanning process will sequentially navigate through these four segments: Nifty, Nifty100, Nifty200 and Nifty500.
List symbols where c crossed above supertrend(10,3)
This scan will generate a list of symbols where the value of “c” (representing the current Close) has recently crossed above the “supertrend(10,3)” threshold.
The scan will navigate across the four mentioned segments (Nifty, Nifty100, Nifty200 and Nifty500) looking for symbols where this specific condition has been met.
Here, “supertrend(10,3)” refers to the SuperTrend indicator with a setting of 10-bars and a multiplier of 3.
Line 4 and 5
Add Column Close Add Column SUPERTREND(10,3) chart
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 two columns: the latest closing value, and the latest value of the SuperTrend indicator.
These columns will be titled “Close” and “SUPERTREND(10,3)”, respectively.
The function “chart” will simply plot the mentioned indicator on the chart of the resultant symbol in ChartAlert.
Apply to IndexNames
The “Apply to…” function applies the scanning process to the variable “IndexNames”.
As mentioned earlier, “IndexNames” represents an optimized variable, and is designed to indicate 4 main segments, namely Nifty, Nifty100, Nifty200, and Nifty500.
In other words, the scan will effectively examine all constituent elements within the Nifty, Nifty100, Nifty200, and Nifty500 Indices.
The optimized scan code concludes with an “END” statement.