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,046 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.
|
xarlor 587 posts msg #155962 - Ignore xarlor |
2/25/2021 9:52:55 PM
Silly SF syntax rearing its ugly head once more.
|
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.
|