StockFetcher Forums · Filter Exchange · Absolute value issue<< >>Post Follow-up
sunspore
18 posts
msg #155943
Ignore sunspore
2/24/2021 8:56:11 PM

Anyone know why this doesn't work? I want to return stocks with a tighter open-to-close range than yesterday. This seems like it should work, but there are tons of stocks in the return list whose range today is greater than that of yesterday.

close between 20 and 21

set{yday, abs(close - open) 1 day ago}
set{tday, abs(close - open)}

tday < yday

graftonian
1,089 posts
msg #155945
Ignore graftonian
2/24/2021 11:06:46 PM

I ran it, it's doing all you asked

sunspore
18 posts
msg #155947
Ignore sunspore
2/25/2021 7:27:02 AM

@graftonian
I just ran it again to make sure. It's not returning what I think I'm asking. Maybe I'm asking something different than I think. In my results, clearly on many, if not most of the stocks, the body of the most recent candle (tday) has a wider range than the previous candle (yday). I want just the opposite, and only the opposite. Am I asking incorrectly?

nibor100
1,031 posts
msg #155948
Ignore nibor100
2/25/2021 9:43:20 AM

@sunspore,

I think Graf took too quick a look at it as you are correct it is not returning what you want.

When filters don't return what I want I start adding add column statements for every variable that I set and other pieces of info also to help figure out what is going on as shown in the filter below.

It appears you are expecting too much out of your ABS statements.
Take a look at the ABS example under the Indicators forum for proper wording.

Ed S.

Fetcher[
close between 20 and 21

set{yday, abs(close - open) 1 day ago} add column yday
set{tday, abs(close - open)} add column tday
add column yday minus tday
add column open 1 day ago
add column open
add column close minus open 1 day ago
tday < yday
]



xarlor
581 posts
msg #155962
Ignore xarlor
2/25/2021 9:52:55 PM

Silly SF syntax rearing its ugly head once more.

Fetcher[
close between 20 and 21

set{yday, abs(close minus open) 1 day ago}
set{tday, abs(close minus open)}

tday < yday

do not draw tday
do not draw yday
]



sunspore
18 posts
msg #155970
Ignore sunspore
2/26/2021 7:31:46 AM

@nibor100
Thanks for your comments, adding columns seems like a great troubleshooting technique.

@xarlor
Wow! It was the difference between the minus sign and the actual word "minus"??!!
I remember trying that before I posted with no change, but clearly that's the issue. I must have been tired.
Thank you.

StockFetcher Forums · Filter Exchange · Absolute value issue<< >>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.