StockFetcher Forums · General Discussion · Filter programming info<< >>Post Follow-up
Tracks
4 posts
msg #143389
Ignore Tracks
4/29/2018 9:47:46 AM

Hi folks. I'm new to StockFetcher and looking for a manual or something that explains available functions and math in the filters. I grabbed the userguide, and I have been searching the forums, but results have not been great. For example, just figuring out how to calculate a square root took about 15 minutes to find a reference with an example. It appears that a simple OR statement is not available, which seems odd, so I also have questions about the possibility of nesting statements.

I'm sure most of my questions have already come up, but I can't seem to find a lot of them in the forums or the guide, so I feel like I'm missing something.

Can anyone enlighten me?

four
5,087 posts
msg #143391
Ignore four
modified
4/29/2018 1:17:30 PM

https://www.stockfetcher.com/forums/General-Discussion/OR-condition/104282/-1/104288

Here is his way of working with logic:

TheRumpledOne
6,362 posts
msg #104288
- Ignore TheRumpledOne
1/8/2012 8:42:31 PM

I posted this years ago..

I have implemented OR, NOT and AND using SF set and count functions. Now we have a complete logic system within SF. THERE IS NOTHING YOU CAN'T DO NOW!
This should revolutionize SF Filter writing.

Fetcher[/* OR Implementation */
/* by definition OR is TRUE IF A is TRUE, B is TRUE, or A AND B is TRUE*/
/* THEREFORE by counting and adding, if the sum is greater than 0 the OR condition is TRUE. */
/* Copyright 2003 by Avery T. Horton, Jr. */
/* Permission to use OR Implementation withing StockFetcher Granted */
/* Permission to publish or post on any other forum DENIED */
/* ----------------------------------------------------------------*/
set{A, count(close above 100, 1)}
set{B, count(volume above 50,000,000, 1)}
set{OR1, A + B} show stocks where OR1 above 0
]






Fetcher[
/* NOT Implementation */
/* by definition NOT A is TRUE IF A is FALSE*/
/* THEREFORE by counting and adding, if the sum is equal to 0 the NOT condition is TRUE. */
/* Copyright 2003 by Avery T. Horton, Jr. */
/* Permission to use NOT Implementation withing StockFetcher Granted */
/* Permission to publish or post on any other forum DENIED */
/* ----------------------------------------------------------------*/
set{NOT, count(close below 100, 1)}
show stocks where NOT equal 0
]






Fetcher[
/* AND Implementation */
/* by definition A AND B is TRUE IF A is TRUE and B is TRUE*/
/* THEREFORE by counting and adding, if the sum is equal to 2 the AND condition is TRUE. */
/* Copyright 2003 by Avery T. Horton, Jr. */
/* Permission to use NOT Implementation withing StockFetcher Granted */
/* Permission to publish or post on any other forum DENIED */
/* ----------------------------------------------------------------*/
set{A, count(close above 100, 1)} set{B, count(volume above 1000000, 1)}
set{X, A + B} show stocks where X equal 2
]






Ok, first, before you BLAST me with "SF already has AND", just sit back, relax and OPEN you mind...

Using these functions, you have a complete logic system. You can implement a complete SET THEORY.

OR is greater than 0
AND is equal 2
NOT is equal 0

So by putting each condition you are filtering in a COUNT and then using SET to sum the condition pair, you can test for the OR, AND or NOT condition.

If you don't understand LOGIC or SET THEORY, I suggest you do a www.google.com search.

Those who understand will see the simple elegance of this.

GOOD LUCK WITH YOUR FILTERS!


Mactheriverrat
3,156 posts
msg #143393
Ignore Mactheriverrat
4/29/2018 1:39:30 PM

http://stockfetchery.blogspot.com

StockFetcher Forums · General Discussion · Filter programming info<< >>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.