Stock Screener – Example 20: List all instances of a n-mo Price Performance greater than 100% in the last 5+ years

This is an example of a scan (all instances of a 100%+ return in any ‘n’-month rolling period in the last ‘m’ years) that can be written using the Advanced Scanner that ships with ChartAlert.

1–2 minutes


ATTN: This scan is similar to an earlier scan (refer to Example 19: n-month Price Performance greater than 100% in the last 5+ years), with the exception that we’re actually going to extract data in this scan.


List data from "01-Jan-2018" 
where chg%(cl, cl 2 months ago) > 100

Add Column date 2 months ago as Dt2mAgo
Add Column close 
Add Column close 2 months ago as C2mAgo

Add Column chg%(cl, cl 2 months ago) as 2moChg
Add Column SymbolValue(chg%(cl, cl 2 months ago),NIFTY) as 2moChgNifty

Apply to nifty500

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


Continue reading “Stock Screener – Example 20: List all instances of a n-mo Price Performance greater than 100% in the last 5+ years”

Stock Screener – Example 19: n-month Price Performance greater than 100% in the last 5+ years

This is an example of a scan (most recent instance of a 100%+ return in any ‘n’-month rolling period in the last ‘m’ years) that can be written using the Advanced Scanner that ships with ChartAlert

1–2 minutes

List symbols where DATEWHEN(chg%(cl, cl 2 months ago) > 100) > "01-Jan-2018"

Add Column DATEWHEN(chg%(cl, cl 2 months ago)>100) as Date
Sort on Column Date desc
Add Column VALUEWHEN(chg%(cl, cl 2 months ago)>100,chg%(cl, cl 2 months ago)) as 2moChg
Add Column VALUEWHEN(chg%(cl, cl 2 months ago)>100,SymbolValue(chg%(cl, cl 2 months ago),NIFTY)) as 2moChgNifty

Apply to nifty500

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


Continue reading “Stock Screener – Example 19: n-month Price Performance greater than 100% in the last 5+ years”

Stock Screener – Example 18: Multiple Parameters Multiple Inputs; n-month Price Performance (“Set report type to…”)

This is an example of an optimized scan (n-month price performance) that demonstrates the enhanced “Set report type to…” function; it can also 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 a parameter 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 an earlier scan (refer to Example 8: Multiple Parameters Multiple Inputs; Yearly Price Performance (“Set report type to…”)), with the exception of certain filters being applied and 3 month price performance being scanned.


[BEGIN 3moPP chg1%-chg2%]
Set OptVar chg1 = -90, 0, 25, 50
Set OptVar chg2 = 0, 25, 50, 1000

List symbols where 
Chg%(cl, cl 3 months ago) >= chg1
and Chg%(cl, cl 3 months ago) < chg2
and close > 100 
and volume > 100000
and trades > 1000

Add Column Chg%(cl, cl 3 months ago) as chg%
  Sort on Column chg% desc
Add Column volume
Add Column TRADES

Apply to NIFTYTOTAL
[END]

set reporttype to summary

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


Continue reading “Stock Screener – Example 18: Multiple Parameters Multiple Inputs; n-month Price Performance (“Set report type to…”)”

Stock Screener – Example 17: One Parameter Multiple Values (Noiseless Charts) (“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)

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 a parameter 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.

[BEGIN P&F Double Top Buy PercentValue%] 
Set OptVar PercentValue = 0.5, 1, 1.5, 2
List symbols where pattern is PF Double Top Buy
Add Column PFTOP
Add Column CandleClose
Set chart type to PF(PERCENTAGETYPE,PercentValue)
Apply to NIFTYTOTAL
Plot
[END]

[BEGIN P&F Double Bottom Sell PercentValue%]
Set OptVar PercentValue = 0.5, 1, 1.5, 2
List symbols where pattern is PF Double Bottom Sell
Add Column PFBOT
Add Column CandleClose
Set chart type to PF(PERCENTAGETYPE,PercentValue)
Apply to NIFTYTOTAL
Plot
[END]

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


Continue reading “Stock Screener – Example 17: One Parameter Multiple Values (Noiseless Charts) (“Set chart type to…”)”

Stock Screener – Example 16: 3mo Relative Performance (% change of a portfolio’s components)

This is an example of a scan that demonstrates the enhanced “relperf()” and “rank()” functions; these functions can be used to compute and compare the % change of a portfolio’s components with any Index

1–2 minutes

This functionality was introduced in October 2023 (Version 23.10.1)

Below is an illustration of an enhanced scan that can be created using the Advanced Scanner in ChartAlert.

List symbols where relperf(cl,3,m) > Symbol Value(relperf(cl,3,m),NIFTY)

Add Column cl
Add Column Symbol Value(c,nifty) as CNifty
Add Column relperf(cl,3,m) as RP
Add Col Symbol Value(relperf(cl,3,m),NIFTY) as RPNifty
Add Column rank(relperf(cl,3,m), DESCENDING) as Rank

Sort on Column Rank 

Apply to Nifty

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


Continue reading “Stock Screener – Example 16: 3mo Relative Performance (% change of a portfolio’s components)”

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)

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 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.


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

Stock Screener – Example 14: Multiple Parameters Multiple Values; 12Mo PP; Top & Bottom 20

This is an example of an optimized scan that demonstrates some enhanced functionality; 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, now replaces the need for writing at least 26 separate scans as was required in the previous versions of ChartAlert.


ATTN: This scan is similar to the earlier scan (refer to Example 13: Multiple Parameters Multiple Values; Yearly PP; Top 20 Bottom 20), with the exception that this scan will list the Top 20 and Bottom 20 symbols of the last 13 months (including the ongoing month).


[BEGIN Top20 M2 mths ago]
Set OptVar M1 = Min:1, Max:13, Step:1
Set OptVar M2 = Min:0, Max:12, Step:1
List symbols
Add Column C M1 bars ago as C1
Add Column C M2 bars ago as C2
Add Column Date M1 bars ago as D1
Add Column Date M2 bars ago as D2
Add Column Chg%(C M2 bars ago, C M1 bars ago) as chg%
Sort on Column chg% desc limit 20
Apply to Nifty
Set periodicity to Monthly
[END]

[BEGIN Bot20 M2 mths ago]
Set OptVar M1 = Min:1, Max:13, Step:1
Set OptVar M2 = Min:0, Max:12, Step:1
List symbols
Add Column C M1 bars ago as C1
Add Column C M2 bars ago as C2
Add Column Date M1 bars ago as D1
Add Column Date M2 bars ago as D2
Add Column Chg%(C M2 bars ago, C M1 bars ago) as chg%
Sort on Column chg% limit 20
Apply to Nifty
Set periodicity to Monthly
[END]

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


Continue reading “Stock Screener – Example 14: Multiple Parameters Multiple Values; 12Mo PP; Top & Bottom 20”

Stock Screener – Example 13: Multiple Parameters Multiple Values; Yearly PP; Top & Bottom 20

This is an example of an optimized scan that demonstrates some enhanced functionality; 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, now replaces the need for writing atleast 44 separate scans as was required in the previous versions of ChartAlert.

[BEGIN Top20 Year1-Year2]
Set OptVar Year1 = Min:2001, Max:2022, Step:1
Set OptVar Year2 = Min:2002, Max:2023, Step:1

Set Var Bar1 = BARATDATE("31-Mar-Year1")
Set Var Bar2 = BARATDATE("31-Mar-Year2")

Set Var C1 = ValueAt(Bar1)
Set Var C2 = ValueAt(Bar2)

List symbols
Add Column C1
Add Column C2
Add Column Chg%(C2,C1) as chg%
Sort on Column chg% desc limit 20
Apply to Nifty
[END]


[BEGIN Bottom20 Year1-Year2]
Set OptVar Year1 = Min:2001, Max:2022, Step:1
Set OptVar Year2 = Min:2002, Max:2023, Step:1

Set Var Bar1 = BARATDATE("31-Mar-Year1")
Set Var Bar2 = BARATDATE("31-Mar-Year2")

Set Var C1 = ValueAt(Bar1)
Set Var C2 = ValueAt(Bar2)

List symbols
Add Column C1
Add Column C2
Add Column Chg%(C2,C1) as chg%
Sort on Column chg% limit 20
Apply to Nifty
[END]

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


Continue reading “Stock Screener – Example 13: Multiple Parameters Multiple Values; Yearly PP; Top & Bottom 20”

Stock Screener – Example 12: Multiple Scan Blocks (like a screener) (“Set report type to…”)

This is an example of an optimized scan that demonstrates the enhanced (“Set report type to…”) function; it can use “Multiple Scan Blocks” to mimic a screener; it can replace the need for maintaining 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 now replaces the need for writing two separate scans as was required in the previous versions of ChartAlert . . . It actually functions like a screener by incorporating two sections of code (each marked with its own BEGIN/END statements) designed to identify and analyze two separate conditions.


ATTN: This scan is an identical copy of an earlier scan (refer to Example 4: Multiple Scan Blocks (like a screener)), with the exception of the final line (“Set report type to SUMMARY”).


[BEGIN close>ema(20)]

List symbols where c > ema(20)

Add Column Close
Add Column ema(20) chart(lw=2)

Apply to NIFTY500

[END]

[BEGIN close<ema(20)]

List symbols where c < ema(20)

Add Column Close
Add Column ema(20) chart(lw=2)

Apply to NIFTY500

[END]

Set report type to SUMMARY

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


Continue reading “Stock Screener – Example 12: Multiple Scan Blocks (like a screener) (“Set report type to…”)”

Stock Screener – Example 11: Multiple Parameters Multiple Values (“step”) (“Cross Variables”)

This is an example of an optimized scan that demonstrates the enhanced (“step”) (“Cross Variables”) 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 atleast twelve separate scans as was required in the previous versions of ChartAlert.

[BEGIN timeP1 XABV timeP2]

Set OptVar timeP1 = min:10,max:30,step:10
Set OptVar timeP2 = min:50,max:200,step:50

Cross OptVar

List symbols where SMA(timeP1) crossed above SMA(timeP2)

Add Column Close
Add Column SMA(timeP1) chart(c=red, lw=2)
Add Column SMA(timeP2) chart(c=green, lw=2)

Apply to NIFTY500

[END]

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


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