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 Appears to be Calculating % EMA Values Incorrectly
Hi, following are my 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]
and [favorites list is not 5]
and [favorites list is not 11].
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]
and [favorites list is not 5]
and [favorites list is not 11].
Stock symbol MTCH appears to meet the criteria (lists 5 & 11 are empty) for both scans but is not included in the scan results. Can you help me understand why?
(For clarification, if I ran this scan on Saturday, 2/24/18 and am looking at the weekly chart, would one week ago be the week of 2/19 or 2/12 for determining the weekly EMA? Same question for two and four weeks ; which date matches each look back?)
Thanks for your help.
0
Comments
weekly ema(26, weekly close)
My understanding is, if you run the scan after the close on Friday, and before Monday's open, or after Monday's open with the scan date set for the previous Friday,
weekly (ema(26, weekly close)
would refer to the week just ended (so 2/19-23 in your example), and
1 week ago weekly ema(26, weekly close)
would refer to the value after the close of the Friday before that (so 2/12-16).
Also, for PctDiff(), the documentation doesn't explain which term is the divisor. In your case, you want it to be the second, as you have written it. What happens if you reverse the order?