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.
|
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.
|