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.
Where Is My Scanning Error ?
Hello, I'm merging the results of the following two scans:
Scan 1:
[type is stock]
and [[exchange is NYSE] or [exchange is NASDAQ]]
and [sma(50,volume) > 100000]
and [Close > 5]
and [Weekly PctDiff(weekly EMA(26,close), 1 week ago weekly EMA(26,close)) >= 2]
and [Weekly PctDiff(1 week ago weekly EMA(26,close), 2 weeks ago weekly EMA(26,close)) >= 2]
Scan 2:
[type is stock]
and [[exchange is NYSE] or [exchange is NASDAQ]]
and [sma(50,volume) > 100000]
and [Close > 5]
and [Weekly PctDiff(weekly EMA(26,close), 2 weeks ago weekly EMA(26,close)) >= 3]
and [Weekly PctDiff(2 weeks ago weekly EMA(26,close), 4 weeks ago weekly EMA(26,close)) >= 3]
The results do not include VOO or QQQ which both appear to clearly meet these criteria. Can you help me understand why?
0
Comments
If you run them mid-week, say on a Tuesday, the current weekly close is the close as of the run date/time. That would make the prior Friday's close 1 week ago, not the current week, and so on.
As part of answering your question, let me show you a technique for quickly answering it for yourself. This will allow you to determine not only what is going on in this case, but in other future cases.
Basically, add a clause to the top of the scan that limits the scan to a stock you suspect via the "SYMBOL" variable, then "comment out" all of the other lines in the scan by adding "//" to the front of each line. Next, un-comment the first line of your scan and run the scan. If you see your ticker symbol in the results, it means that the line you un-commented did not cause the problem. Keep un-commenting each line one-by-one, re-running the scan after each line is un-commented, until your ticker symbol disappears from the results. When that happens, the last line that you un-commented is the culprit.
For example, here is your first scan set up with QQQ:
[symbol is 'QQQ'] and
[type is stock]
//and [[exchange is NYSE] or [exchange is NASDAQ]]
//and [sma(50,volume) > 100000]
//and [Close > 5]
//and [Weekly PctDiff(weekly EMA(26,close), 1 week ago weekly EMA(26,close)) >= 2]
//and [Weekly PctDiff(1 week ago weekly EMA(26,close), 2 weeks ago weekly EMA(26,close)) >= 2]
After running the test serval times, I see that QQQ disappears from the results with the next-to-last line is un-commented:
[symbol is 'QQQ'] and
[type is stock]
and [[exchange is NYSE] or [exchange is NASDAQ]]
and [sma(50,volume) > 100000]
and [Close > 5]
and [Weekly PctDiff(weekly EMA(26,close), 1 week ago weekly EMA(26,close)) >= 2]
//and [Weekly PctDiff(1 week ago weekly EMA(26,close), 2 weeks ago weekly EMA(26,close)) >= 2]
So the PctDiff() calculation is what is screening QQQ out. The next step is to use the "RANK BY" option to see what the values for each of the parts of that clause are. For example, adding "RANK BY Weekly EMA(26,close)" and re-runing the scan will show you the value for that part of the clause. Doing that for each part gives me the following:
Weekly EMA(26,close) = 159.238
1 Week Ago Weekly EMA(26,close) = 158.610
PctDiff(159.238, 158.610) = 100 x (158.610 - 159.238) / 159.238 = -62.8 / 159.238 = -0.394378226302767
Since that value is not >= 2, QQQ was discarded.
Alternatively, you could set up a chart for QQQ and set the end dates appropriately to get the ema values on those dates and do the manual math.