StockFetcher Forums · General Discussion · Using 'Not'<< >>Post Follow-up
tmaugham
115 posts
msg #57006
Ignore tmaugham
11/26/2007 1:39:03 PM

Is is possible to use 'not' in an expression? For example, price has not been increasing for the last 10 days. If I can't use that construction is there any other way to get the same results?

Thanks,
Tom

nikoschopen
2,824 posts
msg #57019
Ignore nikoschopen
11/26/2007 6:43:59 PM

Depending on how complex the filter might be, you can use the following method to utilize the "NOT" expression in ure screener:

set{variable, count(conditional,1)}
set{NOT, 1 - variable}
NOT equals 1

Suppose you do NOT want (or exclude)stocks that made new 52-week low included in ure results:

set{lo52wk, count(price reached a new 52 week low,1)}
set{NOT_lo52wk, 1 - lo52wk}
NOT_lo52wk equals 1
/*append ure own filter here*/

So, for example, if I want to find stocks that have not made the new 52-week low within the last 2 weeks but which I think have bottomed nonetheless based on the lower Bollinger band crossover:

Fetcher[
set{lo52wk, count(days(price reached a new 52 week low,10) is above 0,1) }
set{NOT_lo52wk, 1 - lo52wk}
NOT_lo52wk equals 1
Price crossed below the lower bollinger band (20)
price above 20
avgvol(17) above 300000
]



nikoschopen
2,824 posts
msg #57021
Ignore nikoschopen
11/26/2007 6:51:37 PM

...price has not been increasing for the last 10 days.

I might as well just write it out for you. Taking the above example, you would write it as:

Fetcher[
set{up10days, count(price has been increasing for the last 10 days,1)}
set{NOT_up10days, 1 - up10days}
NOT_up10days equals 1
]



tmaugham
115 posts
msg #57030
Ignore tmaugham
11/26/2007 7:43:33 PM

Thank you very much, most helpful....

Tom

four
5,087 posts
msg #125625
Ignore four
10/16/2015 7:45:05 PM

pop

sshymko
9 posts
msg #125628
Ignore sshymko
modified
10/16/2015 8:01:21 PM

The suggested workaround greatly complicates and obscures an otherwise natural and descriptive filtering language. Instead, would be great to extend the language itself. Internally it can be implemented as count() and comparison operators. But end users would greatly appreciate the high-level NOT syntax.

Thanks in advance.

StockFetcher Forums · General Discussion · Using 'Not'<< >>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.