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 return incorrect results
I created a scan in which I do not want the following 3 groups to be included, but the result of the scan only returns data for those 3 groups. What am I doing wrong?
this is the function I typed in:
and [ [group != Biotechnology] or [group != Pharmaceuticals] or [group != FinancialSector] ]
Thanks for your help!
this is the function I typed in:
and [ [group != Biotechnology] or [group != Pharmaceuticals] or [group != FinancialSector] ]
Thanks for your help!
0
Comments
-
Change "or" to "and".
Biotech is not Pharmaceuticals, so it fits one of your "or" conditions (not Pharmaceuticals), so it's a hit.
Same for the other two.
Biotech is Biotech, so it violates one of your "and" conditions, so even if any other number of conditions is true, it won't be a hit because it violates that one "and" condition.
So, ALL "and" conditions must be true to get a hit.
But if you have a series of "or" conditions, only ONE has to be true to get a hit (provided all the "and" conditions in the same scan are also true).
You can leave the syntax as is, or you can rewrite it:
// previous things
...
// exclude all these groups
and [group != Biotechnology]
and [group != Pharmaceuticals]
and [group != FinancialSector]
// next things
...
0 -
Hi Mark. I tried the exact code you have right above to exclude Biotech & pharma stocks but when i run my scan with that code, I get zero returns.
Ant thoughts?
0 -
I got exclude to work by using "is not" instead of "!="
and [group is not Biotechnology]
and [group is not Pharmaceuticals]
thanks and have a good weekend.0 -
Yes, that does work. Thank you.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