New Members: Be sure to confirm your email address by clicking on the link that was sent to your email inbox. You will not be able to post messages until you click that link.
Scan 3 Sectors at the same time
i built a basic scan encompassing Sectors and Industries which I picked from the Scan Components-Sectors and Industries drop-down list.
I picked 3 sectors for the scan: Technology Sector, Health Care Sector, and Materials Sector. Unfortunately i CAN NOT get the scan to run against all 3 sectors at the same time, instead I have to run each sector scan individually and then combine the results from the 3 scans.
This is the script that got inputted from the drop down list:
and [group is HealthCareSector]
and [group is TechnologySector]
and [group is MaterialsSector]
Is there a way to scan all 3 sectors all at once rather than 1 at a time?
I picked 3 sectors for the scan: Technology Sector, Health Care Sector, and Materials Sector. Unfortunately i CAN NOT get the scan to run against all 3 sectors at the same time, instead I have to run each sector scan individually and then combine the results from the 3 scans.
This is the script that got inputted from the drop down list:
and [group is HealthCareSector]
and [group is TechnologySector]
and [group is MaterialsSector]
Is there a way to scan all 3 sectors all at once rather than 1 at a time?
0
Comments
-
You need an "or" condition instead of a series of "and" statements.
The scan engine returns symbols when ALL the conditions in the scan are true.
So, when all the conditions are "and" conditions, all those "and" conditions have to be true. But symbols can belong to only one group at a time, so if you ask for 'and Health and Technology', no symbol can fit both conditions, so you get no results.
However, for an "or" condition, only one of the alternatives inside of the "or" condition has to be true for the whole "or" condition to be true. (Only one HAS to be true; if two or more are true, symbols for all the true alternatives get returned).
To write an "or" condition, you have to put all the alternatives inside a set of brackets. So yours would look like this:
// some other preceding statement
and
[ // opening or bracket
[group is HealthCareSector] // first alternative
or [group is TechnologySector] //second alternative
or [group is MaterialsSector] // third alternative
] // closing or bracket
// some other following statements
The "or" operator is explained here (about two thirds down the page):
https://support.stockcharts.com/doku.php?id=scans:advanced_scan_syntax0 -
that worked great, thanks.0
Categories
- All Categories
- 2.3K StockCharts
- 395 SharpCharts
- 146 Other Charting Tools
- 69 Saved Charts and ChartLists
- 1.5K Scanning
- 73 Data Issues
- 177 Other StockCharts Questions
- 218 Technical Analysis
- 155 Using Technical Analysis
- 2 InterMarket and International
- 19 Market and Breadth Indicators
- 42 Market Analysis
- 109 Trading
- 109 Trading Strategies
- 163 S.C.A.N the StockCharts Answer Network forum
- 65 Using this StockCharts Answer Network forum
- 98 s.c.a.n. archives
- 5 Off-Topic
- 6 The Cogitation & Rumination Emporium
- Forum Test Area