StockFetcher Forums · General Discussion · Questions about "is approaching"<< >>Post Follow-up
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.

Fetcher[
set{diff, close - ma(20)}
set{%diff, diff / ma(20)}
set{diff%, %diff * 100}
add column diff%
]



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)

StockFetcher Forums · General Discussion · Questions about "is approaching"<< >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2016 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus