drago9955 6 posts msg #104282 - Ignore drago9955 |
1/8/2012 5:54:19 AM
Hi,
Good Day.
I wonder if there is a way to do a "OR" condition.
eg.
Close gained more than 10% over the past 5 days
or Close gained more than 15% over the past 10 days
The above scan is obviously not working in the right direction.
Does a "or" exist in the stockfetcher's syntax ?
Is there other way to get the "or" function ?
Thank You.
:)
Francis
|
Kevin_in_GA 4,599 posts msg #104283 - Ignore Kevin_in_GA |
1/8/2012 8:27:07 AM
I wonder if there is a way to do a "OR" condition.
eg.
Close gained more than 10% over the past 5 days
or Close gained more than 15% over the past 10 days
The above scan is obviously not working in the right direction.
Does a "or" exist in the stockfetcher's syntax ?
+++++++++++++++++++++++++++
Yes, this can be done but it needs to be done more "mathematically". By the way, please search the forums before posting this, as this has been asked over and over and over.
It requires that each criterion be set as a separate user-defined variable and then used within the "count function" -
By counting each time the stock meets a specific criteria, then summing those counts, the result (combine) will have a value of 1 if any of them are met.
If all of them must be met, use the same trick but MULTIPLY them instead of adding.
|
maxreturn 745 posts msg #104284 - Ignore maxreturn |
1/8/2012 8:31:24 AM
Check out this link
http://www.stockfetcher.com/stockdb/fetcher?p=forum&sub=view&fid=1001&tid=28017
|
TheRumpledOne 6,411 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.
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!
|
drago9955 6 posts msg #104322 - Ignore drago9955 |
1/9/2012 10:35:29 PM
Hi,
Thank guys !
Thank you all very much for the replies.
I will go thro' them and hope that I can understand.
:)
Francis
|