StockFetcher Forums · General Discussion · logic.. ands and ors.<< >>Post Follow-up
rtucker
318 posts
msg #33636
Ignore rtucker
10/23/2004 5:50:21 AM

need help with trying to find flags. this filter only sees 3 to 7 days consolidation. if i try to add more or's it dosent work. am i doing something wrong or am i reaching a SF limit. Oh.. thank you Cegis / others for instructing as well as posting great filters.


set{v,count(3 day slope of close is between .02 and -.04,1)}
set{a,count(5 day slope of close 3 days ago > .08,1)}
set{and1,v * a }

set{t,count(4 day slope of close is between .02 and -.04,1)}
set{r,count(5 day slope of close 4 days ago > .08,1)}
set{and4,t * r }


set{b,count(5 day slope of close is between .02 and -.06,1)}
set{c,count(5 day slope of close 5 days ago > .08,1)}
set{and2,b * c }

set{d,count(6 day slope of close is between .02 and -.06,1)}
set{e,count(5 day slope of close 6 days ago > .08,1)}
set{and3,d * e}

set{h,count(7 day slope of close is between .02 and -.06,1)}
set{i,count(5 day slope of close 7 days ago > .08,1)}
set{and5,h * i }





set{or1,and1 + and2}
set{or2,or1 + and3}
set{or3,or2 + and4}
set{or4,or3 + and5}
or4 > 0








SurfnDestiny
78 posts
msg #33645
Ignore SurfnDestiny
10/23/2004 6:45:01 PM

Hey, thanks for showing me the answer to my back day slope question in your example.


cegis
235 posts
msg #33661
Ignore cegis
10/24/2004 12:19:08 PM

rtucker,

After the great compliment, how could I refuse an answer?! <grin>

SF has a limit as to the "computational expense" of a filter, which it attempts to calculate. One thing that is "expensive" as far as SF is concerned is "nesting" set{}s. That is, one set{} based on another set{}, based on another, and so on, such as in your calculation of or4 (in particular).

Sometimes, but not always, you can get further in your calculations by removing a level of nesting, if possible. In your case, you don't HAVE to use set{}s for v, a, t, r, b, c, d, e, h or i. Simply substitute the count()s for these set{}s in the calculation of and1, and2, and3, and4, and and5 - thus removing the extra level of nesting.

Also, it may help (although I have not proven it to myself yet) if you calculate the or's as such:

set{or1,and1 + and2}
set{or2,and3 + and4}
set{or3,or1 + or2}
set{or4,or3 + and5}

You may notice that the number of "levels down" the set{}s nest in my implementation is 3, where in yours it's 4.

HTH,

C


StockFetcher Forums · General Discussion · logic.. ands and ors.<< >>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.