ironfist 7 posts msg #59501 - Ignore ironfist |
2/6/2008 11:47:01 AM
(assume you're doing "is approaching" a moving average)
1. How close does a stock's price have to come to the moving average for it to be included in the results?
2. How come when I run the filter intraday, 99% of the results are stocks that have just recently crossed the moving average?
3. Is there a way to return stocks whose current prices (or closing prices if after hours) is within x% or x dollars of a moving average?
I'm looking for stocks that are ABOUT to cross a moving average, not stocks that have JUST CROSSED their moving average.
Thanks.
|
nikoschopen 2,824 posts msg #59504 - Ignore nikoschopen |
2/6/2008 12:10:15 PM
Try "X is approaching [indicator] from below and X is under [indicator]."
|
nikoschopen 2,824 posts msg #59505 - Ignore nikoschopen |
2/6/2008 12:18:39 PM
Per question 3, you'll need to use a group of set statements. For example, the following filter will spit out just what the percentage difference is between SMA(20) and the closing price, which will be shown in column "diff%". A positive value would mean the close is above the SMA(20) and vice versa.
|
ironfist 7 posts msg #59517 - Ignore ironfist |
2/7/2008 2:06:10 AM
Thanks for that code!
|
fokane 74 posts msg #59531 - Ignore fokane |
2/7/2008 2:33:42 PM
I found the same problem with is approaching so what I used to do was find stocks in the gap between 40MA and 50MA which gave me more time to watch the stock and plan.
i.e. close is below MA(40) and above MA(50)
|