News Focus
News Focus
icon url

Quasi

09/06/10 3:38 PM

#6656 RE: Peter_Pan #6655

RE: Peter scan for EMA50 within 2%...

Yes it can be done using the advanced scan engine, similar application is covered in an article I wrote for the scanning blog back in March.

http://blogs.stockcharts.com/scanning/2010/03/sc.html

In your particular case the coding would be modified. Basically you find the EMA 50 value for today, multiply by 1.02 & 0.98 to get the plus / minus 2%. Then set the values of the EMA 50 for the past ten days to be within that range, ie max for 10 days is less than the +2% (1.02)and min for 10 days to be greater than the -2% (0.98).

[type = stock]
and [max (10, EMA(50, close) ) <= EMA(50, close) * 1.02]
and [min (10, EMA(50, close) ) >= EMA(50, close) * 0.98]

hope this gives you some ideas
Quasi