#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

# Scan for 10 week EMA crossover a 40 week EMA

I am running into issues, can anyone offer advice?
I am working on a scan to be able to get the 10 week ema crossing over the 40 week ema and be able to do the opposite as well. 10 week ema crossing under the 40 week ema. If I do the 50-200 daily, I believe I would get different results and doesn't match the chart I am looking over.
Can you then rank by a ROC during a 30 day time period? Perhaps that is a different scan of the subset of items found in the first scan??

I was curious to see how the "Rank By Daily ROC(30)" fared vs "Rank By Weekly ROC(4)".

I ran it on the S&P 500 with no filters and no clauses. 23 of the top 50 are in both, 46%.

Even though 30 days is equivalent to 4 weeks, less than half of the results match. So, this means that "Rank By Daily ROC(30)" and "Rank By Weekly ROC(4)" are by no means equivalent. Did I do this analysis right?

I do know that Weekly Indicator values are different than Daily indicator values. So maybe this is no surprise?

I agree that mixing Daily and Weekly periods in a scan is a bad idea. The Daily and Weekly Rank By clause seems to work okay.

and [[weekly sma(10, close) x weekly sma(40, close)] or [weekly sma(40, close) x weekly sma(10, close)]]

MadisonMdot ✭: Yes, I agree that using daily 200 and daily 50 will return different results.

markd, do you use the "or" in this fashion? It is convenient for me, and seem to work well. Also, you have ROC(6). Maybe you meant ROC(4)?

MadisonMdot ✭: Can you then rank by a ROC during a 30 day time period? Perhaps that is a different scan of the subset of items found in the first scan?? I believe whatever results that are generated are simply ranked by the daily period regardless that the results were generated using a weekly period. It appears to work fine.
• mod
Hi Kevo,

There are 30 calendar days in a month, but only about 20 trading days (four weeks x 5 tradings in a week). So ROC(30) is 30 trading days or, if you assume 5 trading days in a week (omitting holidays), six weeks.

Regarding "or": your approach is valid, but I would use separate scans for bullish and bearish set ups. But that's just me.