StockFetcher Forums · Filter Exchange · Correct Syntax Needed<< >>Post Follow-up
JohnT328
53 posts
msg #155167
Ignore JohnT328
1/1/2021 9:13:41 AM

Hi, this is not returning the intended results. Can someone please reword this for me. Thanks

Price was at least 2% below EMA(17) within the last 8 days and price is above EMA(17) and price is more than 0.5% above EMA (6) and exchange is not OTCBB and exchange is not ETF and exchange is not AMEX and average volume is above 1,000,000 and price is between 15 and 1000 and the Historical Volatility(100,1) is above 20 and optionable

xarlor
587 posts
msg #155168
Ignore xarlor
1/1/2021 10:09:32 AM

Please note the distinction between price and close. Price includes the entire candle, including highs and lows. Close is only the close of the day. I think you are using price in places where you actually want close.

Fetcher[
optionable
not OTCBB
not ETF
not AMEX

average volume(30) > 1000000
close > 15
close < 1000

set{2pEMA17,EMA(17) * .98}
count(price < 2pEMA17,8) > 0

close > ema(17)

set{halfpema6,EMA(6) * .995}
close > halfpema6

Historical Volatility(100,1) > 20

do not draw 2pema17
do not draw halfpema6
]



nibor100
1,044 posts
msg #155169
Ignore nibor100
modified
1/1/2021 11:09:22 AM

@xarlor,

I was not aware of that distinction between price and close in SF.

Is it only true for comparisons ? as when I wrote a simple filter to check it out, it seemed I got the exact same results using either term.

Thanks,
Ed S.

JohnT328
53 posts
msg #155170
Ignore JohnT328
1/1/2021 11:22:41 AM

Thanks Xalor

xarlor
587 posts
msg #155174
Ignore xarlor
1/2/2021 10:04:09 AM

Actually nibor, you may be onto something. I remembered when I started writing my own filters back in the naughts I had made a distinction between price and close. I formed that assumption when reading through the SF Usage Guide. I just went back to search where I might have read it. On page 28, this is why I thought there was a difference; emphasis mine:
One note about the touched keyword: while the touched keyword may be mixed with combinations or measures, which do not include price, the results may be inconsistent. This is directly due to the fact that price information is multi-dimensional and represents a particular range, not a single, discrete value.
Turns out it's only the touched keyword that may be inconsistent as interchanging price and close with touched yields the same results.

Color me enlightened.

nibor100
1,044 posts
msg #155175
Ignore nibor100
1/2/2021 3:36:57 PM

Thanks for the info. I'll add Price to my list of SF terms that aren't always what i think they might be:

Near
Between
Lag
and one of my favorites from page 8 of the manual

"StockFetcher always assumes “above” means “greater than or equal to” and
“below” means “less than or equal to.”

Ed S.

StockFetcher Forums · Filter Exchange · Correct Syntax Needed<< >>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.