Stock Screener – Example 10: Multiple Parameters Multiple Values (“step”) (“Cross OptVar”)

This is an example of an optimized scan that demonstrates the enhanced (“step”) (“Cross OptVar”) functions; it can replace the need for writing several scans (as was required in the older versions of ChartAlert)

1–2 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, wherein multiple parameters/ variables can now accept multiple values/ inputs for scanning as well as create a processing matrix between inputs, now replaces the need for writing at least twenty (!) separate scans as was required in the previous versions of ChartAlert.


ATTN: This scan is similar to the earlier scan (refer to Example 9: Multiple Parameters Multiple Values (“step”)), with the exception of the 4th line (“Cross OptVar”).


[BEGIN EMA(timeP1), RSI(timeP2)]

Set OptVar timeP1 = min:10,max:30,step:5
Set OptVar timeP2 = min:10,max:16,step:2

Cross OptVar

List symbols where c crossed above ema(timeP1) AND RSI(timeP2) < 70

Add Column Close
Add Column ema(timeP1) chart(lw=2)
Add Column rsi(timeP2) chart

Apply to NIFTY100

[END]

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


Continue reading “Stock Screener – Example 10: Multiple Parameters Multiple Values (“step”) (“Cross OptVar”)”