#### Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

# EMA(50) 12 week max SCAN

Can anyone help me create a scan which will return stocks/etfs for which the EMA(50) is at its highest (max) for the past 12 weeks .... HELP!

Thanks.

• mod
I'll let you work out the universe part - you can select what kinds of stocks and etfs you want from the drop downs on the advance scan page. See the documentation link below.

Here's two versions of the logic you might use.

I'm guessing that ema(50) means the DAILY ema(50). If so, then you have to convert 12 weeks into days- 5 days in a week, so 12x5 = 60. So:

and [ema(50) = max(60, ema(50)]

That says, today's ema is the highest ema of the past 60 days.

The alternative would be to convert the ema(50) to a weekly ema. Again, 5 days in a week, so 50/5 = 10. Then you get

and [weekly ema(10) = weekly max(12, weekly ema(10))]

Either version gets a lot of hits (surprisingly in this market). So you might want to limit the universe to one or two exchanges like NYSE and NASD (or wherever you want to trade) and maybe a volume limit and/or a market cap minimum. Again, you can select these from the drop downs and edit them for your needs. Check out the documentation for details on valid edit values.