StockFetcher Forums · Filter Exchange · Need help with simple filter.<< >>Post Follow-up
JohnT328
53 posts
msg #149010
Ignore JohnT328
8/29/2019 2:07:09 PM

Hi, I am looking for a filter that will include the below syntax:

"Price is greater than 5% above MA (375)and exchange is not OTCBB and exchange is not ETF and exchange is not AMEX and volume is above 1,000,000 and price is between 15 and 1000 and weekly EMA (9) has been above MA (300) for more than 18 months and price has been above MA (300) for at least 18 months and optionable"

But I also want to include that price has been within a 10% range for the last 8 weeks

Can someone please assist. Thanks

xarlor
561 posts
msg #149011
Ignore xarlor
8/29/2019 2:53:02 PM

John, these 2 lines always return 0 results. They're too extreme.

Fetcher[
weekly ema(9) > ma(300) for last 18 months
close > ma(300) for last 18 months
]



Even halving that to 9 months was only showing a few results per year. I went with 6 months just to get something on the filter. You may have to tweak your parameters.

Fetcher[
market not otcbb
market not etf
optionable

set{var1, ma(375) / price}
set{var2,1 - var1}
var2 > 0.05

draw ma(375)
add column var2

volume > 1000000
close between 15 and 1000

/* Using 18 months in either of the next 2 lines returns 0 results */

weekly ema(9) > ma(300) for last 6 months
close > ma(300) for last 6 months

set{Hi1,high 8 week high}
set{Lo1,low 8 week low}
set{HiLo,Lo1 / Hi1}
set{Range1,1 - HiLo}
add column Range1

Range1 < 0.10
]



JohnT328
53 posts
msg #149013
Ignore JohnT328
8/29/2019 3:30:22 PM

First, thank you for the quick response.

I think there might be something wrong here because when I run my filter with just this language, it returns over 117 stocks:

"Price is greater than 5% above MA (375)and exchange is not OTCBB and exchange is not ETF and exchange is not AMEX and volume is above 1,000,000 and price is between 15 and 1000 and weekly EMA (9) has been above MA (300) for more than 18 months and price has been above MA (300) for at least 18 months and optionable"


I don't think your original two lines as noted below, contemplate my wording above...

weekly ema(9) > ma(300) for last 18 months
close > ma(300) for last 18 months
]

four
5,087 posts
msg #149014
Ignore four
8/29/2019 3:54:15 PM

I don't believe MONTHS can be used.
StockFetcher works with DAYS and WEEKS.

xarlor
561 posts
msg #149015
Ignore xarlor
8/29/2019 4:40:18 PM

four, I'm not sure that's right. I use MONTHS in several filters. It works, as well as YEARS. Here are some tests that check out.

Fetcher[
price 3 months ago between 10 and 10.50
]



Fetcher[
chart-time is 2 years
price 1.5 years ago between 10 and 10.50
]



Fetcher[
chart-time is 1 year
weekly ema(9) > ma(300) for last 6 months
weekly ema(9) < ma(300) 7 months ago
]



xarlor
561 posts
msg #149016
Ignore xarlor
8/29/2019 4:48:31 PM

John, your filters are written in a syntax that SF does not parse. Take the lines below. You can see that it returns results that it shouldn't.

Fetcher[
price has been above MA(300) for at least 18 months
]



Fetcher[
weekly EMA(9) has been above MA (300) for more than 18 months
]



four
5,087 posts
msg #149018
Ignore four
modified
8/29/2019 9:47:47 PM

Thanks xarlor.



StockFetcher Forums · Filter Exchange · Need help with simple filter.<< >>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 2022 - 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


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.