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.
How to include BOTH stocks and ETFs in one single scan ??
I have been running two separate scans, one for [type = etf] and one for [type = stock]. If I combine them with an AND statement, the scan return "0" results. Is there a way to capture all stocks and all ETFs in one scan??
Thank you in advance
0
Comments
[ [type is stock] or [type is etf] ]
The "or" operator is explained here (hard to find) about half way down plus a little:
https://help.stockcharts.com/scanning-and-alerts/writing-scans
In a scan, a symbol must match ALL conditions. A condition is the text contained by a pair of brackets [ ]. A symbol cannot be both a stock AND an etf, so for each symbol one of those statements is false, so you get zero results.
The way around that is the "or" statement.
If a symbol matches any one condition (or more than one, but at least one) the "or" statement is true. So, as long as all other conditions in the scan are true, the symbol will be returned in the results.