Icculi 9 posts msg #33481 - Ignore Icculi |
10/3/2004 11:02:17 PM
Anyone know why this won't work:
Is there a limit on the number of set statements that can be used?
|
cegis 235 posts msg #33483 - Ignore cegis |
10/4/2004 12:57:30 PM
Icculi,
There is no limit to the number of set{} statements in a filter (that I am aware of, although the syntax checker currently complains if there are more than 10). However, there is a limit how many times the set{} command can be "nested" - that is, one set{} being based on another. The number of nestings depends on the functions used, so I can't state an exact number. Very likely (due to the 5 OR's), you have hit the limit.
To determine if this is the case, you can use the "add column" phrase for each of your set{} statements. If any don't show up, there's EITHER a syntax problem (typo), or you hit the limit.
One thing you might want to try, is to not use set{} for the BB and CC variables. When calculating the MM variables, use the count()'s that are in the BB and CC set{}s, like so: set{MM0, COUNT(CLOSE IS BELOW LOWER BOLLINGER BAND(20),1) * COUNT(CLOSE HAS BEEN DECREASING FOR 3 DAYS,1)}. This *DOES* work sometimes, as I have done it before. (I haven't tried in this case, though...)
Another possibility that you could try is simply break the filter up into two or more filters, then create a watch list that auto-fills using the resulting filters. (This would work if the problem IS the nesting of the OR set{}s.)
Another possibility, although it might be some work to figure out correctly, is to use the fact that
(A or B) = NOT[ NOT(A) and NOT(B) ]
as well as
(A and B) = NOT[ NOT(A) or NOT(B) ].
This may get you to a point where your selection condition could read as a series of 5 AND's. "Thinking out loud" (i.e., this may be wrong, test it), that would give:
SET{CC0,1 - COUNT(CLOSE HAS BEEN DECREASING FOR 3 DAYS,1)}
set{MM0, count(close >= lower bolinger band(20),1) + CC0}
<etc. for MM1 thru MM5...>
MM0 * MM1 * MM2 * MM3 * MM4 * MM5 is equal to 0
What this is doing is, for CC0, calculating the NOT of your CC0, and for MM0, it uses the opposite condition of your BB0, and ORs that with my CC0. That makes my MM0 compute to NOT(yourBB0) or NOT(yourCC0), and to NOT that, I just make sure the answer is zero. (I'm not sure if this is 100% right, but it gives you an idea of what I'm talking about...) Note that the maximum number of nesting levels is only one (CC0 within MM0, CC1 within MM1, etc.), instead of your six (BB0 within MM0, MM0 within OR1, OR1 within OR2, etc.).
HTH,
C
|
xplorer 257 posts msg #33485 - Ignore xplorer |
10/4/2004 1:04:05 PM
Your logic looks good ... but I think it is too restrictive ...
You may want to loosen your constraints a bit ....
|
xplorer 257 posts msg #33486 - Ignore xplorer |
10/4/2004 1:09:36 PM
I used your logic ... with less constraints , and it does give results ...
|
Icculi 9 posts msg #33489 - Ignore Icculi |
10/4/2004 5:38:31 PM
Thanks guys. Yeah I figured it was something like that. I'll try your suggestions Cegis. In case your wondering, I'm trying to set up the muddy filter with up to 5 days of failures into one filter, so I don't have to check multiple filters. Currently I have my watch list with the basic filter and then 5 additional filters for each day of failures. It works, but it's not very elegant. Well, thanks again for the help. I'll keep you posted if I come up with something better.
|
TheRumpledOne 6,411 posts msg #33508 - Ignore TheRumpledOne |
10/5/2004 8:01:04 PM
Let me help you.
Here is how to compute fails...
set{CC,days(close is above close 1 day ago,100)}
CC is the # of consective days close is below previous close.
MAY ALL YOUR FILLS BE COMPLETE.
|
TheRumpledOne 6,411 posts msg #33510 - Ignore TheRumpledOne |
10/5/2004 8:02:45 PM
I forgot...
and add column cc
Put those 2 lines of code in your Muddy BB filter.
TAKE ALL YOU CAN. GIVE NONE BACK.
|
cegis 235 posts msg #34553 - Ignore cegis |
12/27/2004 1:57:17 PM
I thought I'd add to this thread just to bring it to the top of the forum list. It seems to be a popular topic lately...
HTH,
C
|
TheRumpledOne 6,411 posts msg #34728 - Ignore TheRumpledOne |
1/3/2005 10:03:31 PM
Check this out:
http://www.agora-inc.com/reports/DJM/WDJMEC24/
RSI(2) being oversold finds all of these stocks.
|
TheRumpledOne 6,411 posts msg #35966 - Ignore TheRumpledOne |
5/11/2005 1:42:18 AM
Just in case you have seen some of my latest filters, here's the thread where the logic comes from.
|