Optuma Forums › Optuma Scripting › Scan manager to identify specific trading day on multi codes › Reply To: Scan manager to identify specific trading day on multi codes
August 18, 2021 at 8:49 am
#65596
- Topics: 5
- Replies: 616
- Posts: 621
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:
1 2 3 4 5 6 7 8 9 10 11 12 |
//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)…