Scan manager to identify specific trading day on multi codes

Hello everyone,

I want to bring up this issue since i don’t find any similar topic on forum.

If i want to identify all the trading days with the 1 day rate of change <=-2% on $spy, $qqq $dji at the same day during the last 10 years. And leave a mark on the chart of $spy for research purpose, what should i do to make it happen ?

I tried with the scan manager but appearently i can’t work out a solution in this module.

Or is there any article in the knowledge base to explain how should we use optuma to get it done ?

As always, i appreciate your time and have a good day ~

Yan

Hi,

You can use the GETDATA() function to achieve this. GETDATA is used to pull in data from other codes, you can then wrap the ROC() around them so you can check values for symbols other than the current chart.

It does not need to be setup as a scan if your intention is to mark all areas that match on the chart, you would open a chart for the SPY and apply a Show Bar with the following script:

//Find ROC for QQQ
V1 = GETDATA(CODE=QQQ:US) ;
V2 = ROC(V1, BARS=1) <= -2;
//Find ROC for DJI
V3 = GETDATA(CODE=DJI:WI) ;
V4 = ROC(V3, BARS=1) <= -2 ;
//Find ROC for current chart
V5 = ROC(BARS=1) <= -2 ;
//Find where all were <= -2%
V2 and V4 and V5

This is how it looks on the chart (using Show Bar with Lines)…

Ex1

[postquote quote=65596]

Thank you for your solution Matthew. Sorry that i can’t reply this a little earlier since i was in hospital for the last 2 days.

I didn’t know that we can use show bar option for such a script who involves different codes. I will watch again the course videos to get more information on that.

Have a good day ~

Yan