Stock Screener – Example 15: Multiple Chart Types (Candlestick; HeikinAshi) (“Set chart type to…”)

This is an example of an optimized scan that demonstrates the enhanced (“Set chart type to…”) function; it can replace the need for writing several scans (as was required in the older versions of ChartAlert)

6 minutes

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 now replaces the need for maintaining two separate scans as was required in the previous versions of ChartAlert.

[BEGIN Bullish SuperT Candlestick]
List symbols where Close has crossed above SUPERTREND(10,3)
Add Column C
Add Column SUPERTREND(10,3) as SuperT
Apply to NiftyTotal
Plot Template SuperTrend heikinAshi
[END]

[BEGIN Bullish SuperT HeikinAshi]
List symbols where Close has crossed above SUPERTREND(10,3)
Add Column C
Add Column SUPERTREND(10,3) as SuperT
Set chart type to Heikinashi
Apply to NiftyTotal
Plot Template SuperTrend heikinAshi
[END]

Below is a breakdown of the scan presented in a step-by-step manner.


Purpose of the Scan

  1. To generate a list of symbols where the latest Close has just crossed above the SuperTrend indicator (on a candlestick chart).
  2. To convert the OHLC data stream into Heikin-Ashi chart-type first, and then generate a list of symbols where the latest Close has just crossed above the SuperTrend indicator.
  3. To display the values of the latest Close and the SuperTrend indicator (as per the candlestick and heikin-ashi charts) in the scan results report.
  4. To scan the components of the following indices: NiftyTotal
  5. To plot a custom Template on the chart if a symbol is opened from inside the scan results report. (the custom Template will include: SuperTrend indicator plotted on a candlestick chart; heikin-ashi plotted as an indicator in that chart; SuperTrend indicator plotted on the heikin-ashi chart)

Let’s go!



Line 1

[BEGIN Bullish SuperT Candlestick]

The first section or block of the optimized scan procedure starts with a “BEGIN” command.

The text “Bullish SuperT Candlestick” that comes after the “BEGIN” command serves as the designated heading for the scan results that will be showcased in the scan report.


Line 2

List symbols where Close has crossed above SUPERTREND(10,3)

This scan will generate a list of symbols where the condition “Close has crossed above SUPERTREND(10,3)” is met.

Here, “Close” refers to the latest closing value of a symbol, and “SUPERTREND(10,3)” refers to the SuperTrend indicator with a setting of 10-bars and a multiplier of 3.


Line 3 and 4

Add Column C
Add Column SUPERTREND(10,3) as SuperT

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 “C” and “SuperT”, respectively.


Line 5

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.


Line 6

Plot Template SuperTrend heikinAshi

The “Plot Template” function enhances your charting experience by allowing you to effortlessly apply a customized template when you click on a symbol within the scan results report to view its chart.

In this context, the recommended template is titled “SuperTrend heikinAshi,” although you have the flexibility to assign any name of your choosing.


To create a template within ChartAlert, follow these step-by-step instructions:

  1. Begin by opening any chart of your choice.
  2. Proceed to plot the SuperTrend indicator on the Candlestick chart type.
  3. Then, add the HeikinAshi as an indicator panel to the same chart.
  4. Overlay the SuperTrend indicator onto the HeikinAshi plot (indicator panel).
  5. Finally, save this template as “SuperTrend heikinAshi,” 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 7

[END]

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


Line 8

[BEGIN Bullish SuperT HeikinAshi]

The second section or block of the optimized scan procedure starts with a “BEGIN” command.

The text “Bullish SuperT HeikinAshi” that comes after the “BEGIN” command serves as the designated heading for the scan results that will be showcased in the scan report.


Line 9

List symbols where Close has crossed above SUPERTREND(10,3)

This scan will generate a list of symbols where the condition “Close has crossed above SUPERTREND(10,3)” is met.

Here, “Close” refers to the latest closing value of a symbol, and “SUPERTREND(10,3)” refers to the SuperTrend indicator with a setting of 10-bars and a multiplier of 3.


Line 10 and 11

Add Column C
Add Column SUPERTREND(10,3) as SuperT

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 “C” and “SuperT”, respectively.


Line 12

Set chart type to Heikinashi

The “Set chart type to…” function provides you with the flexibility to convert your data stream into your preferred chart type before initiating the scanning process.

For instance, in ChartAlert, you can seamlessly transform the OHLC data stream into various chart types such as Point & Figure, Renko, Kagi, Three Line Break, or Line charts, among others, prior to commencing the scanning operation. Please note that the default chart type for scanning is Candlestick.

In the current context, the data stream will be converted into the Heikin-Ashi chart type (“Heikinashi”) just before executing the scan.


Heikin-Ashi is a specialized candlestick charting technique designed to enhance clarity by utilizing modified candlestick values to filter out market noise and accentuate underlying trends. This approach simplifies the identification of the overall price movement direction.

Heikin-Ashi candles are computed by averaging the open and close prices of the preceding candle to determine the open of the current candle. The current candle’s high, low, and close prices are then used to calculate its close, resulting in a smoother representation of price trends compared to traditional candlestick charts.


Line 13

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.


Line 14

Plot Template SuperTrend heikinAshi

The “Plot Template” function enhances your charting experience by allowing you to effortlessly apply a customized template when you click on a symbol within the scan results report to view its chart.

In this context, the recommended template is titled “SuperTrend heikinAshi,” although you have the flexibility to assign any name of your choosing.


To create a template within ChartAlert, follow these step-by-step instructions:

  1. Begin by opening any chart of your choice.
  2. Proceed to plot the SuperTrend indicator on the Candlestick chart type.
  3. Then, add the HeikinAshi as an indicator panel to the same chart.
  4. Overlay the SuperTrend indicator onto the HeikinAshi plot (indicator panel).
  5. Finally, save this template as “SuperTrend heikinAshi,” 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 15

[END]

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


The Scan Reports in ChartAlert

%d