Gold Customer
Joined: 9/26/2010 Posts: 10
|
I am looking to write a scan for stocks in an up trend but tthat are pulling back to a 20 day moving average.
How would one wrtie such a scan?
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You need to start by specifically defining what your terms mean as the first step in identifying something algorithmically using a computer really is actually knowing the details of what you are attempting to find.
To be in an uptrend, does the stock just need to be above the 20-Period Simple Moving Average? Does the stock need to have a positive linear regression slope? Does the stock need to have a positive net change? Both? Over what period? Does the stock need to have a certain percent change? Something else entirely?
To be pulling back to the 20-day average, does the distance between the stock and the moving average just need to be getting smaller? Does it need to be within a certain percentage of the average? Does it need to have crossed down through the average? Something else entirely?
-Bruce Personal Criteria Formulas TC2000 Support Articles
|