Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Having trouble with 'or' Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
mc7e
Posted : Wednesday, October 10, 2012 11:50:43 AM
Registered User
Joined: 3/8/2005
Posts: 23

I was attempting to find stocks that have hit a new high in the last week which hadn't hit new highs anytime in the month before.  In putting together the formula below I've found that each part of the formula (that which is between each 'or') works as a separate pcf but taken together it only produces results for the formula before the first 'or'.  What's up with that?

 H=maxh30 and H1<maxh28.2 and H2<maxh27.3 and H3<maxh26.4 and H4<maxh25.5 and H5<maxh24.6 and h6<maxh23.7 and h7<maxh22.8 and h8<maxh21.9 and h9<maxh20.10 and h10<maxh19.11 and h11<maxh18.12 and h12<maxh17.13 and h13<maxh16.14 and h14<maxh15.15 and h15<maxh14.16 and h16<maxh13.17 and h17<maxh12.18 and h18<maxh11.19 and h19<maxh10.20 and h20<maxh9.21 or 

 
H1=maxh29.1 and H2<maxh27.3 and H3<maxh26.4  and H4<maxh25.5 and H5<maxh24.6 and h6<maxh23.7 and h7<maxh22.8 and h8<maxh21.9 and h9<maxh20.10 and h10<maxh19.11 and h11<maxh18.12 and h12<maxh17.13 and h13<maxh16.14 and h14<maxh15.15 and h15<maxh14.16 and h16<maxh13.17 and h17<maxh12.18 and h18<maxh11.19 and h19<maxh10.20 and h20<maxh9.21 or
 
H2=maxh28.2 and  H3<maxh26.4  and H4<maxh25.5 and H5<maxh24.6 and h6<maxh23.7 and h7<maxh22.8 and h8<maxh21.9 and h9<maxh20.10 and h10<maxh19.11 and h11<maxh18.12 and h12<maxh17.13 and h13<maxh16.14 and h14<maxh15.15 and h15<maxh14.16 and h16<maxh13.17 and h17<maxh12.18 and h18<maxh11.19 and h19<maxh10.20 and h20<maxh9.21 or
 
H3=maxh27.3 and H4<maxh25.5 and H5<maxh24.6 and h6<maxh23.7 and h7<maxh22.8 and h8<maxh21.9 and h9<maxh20.10 and h10<maxh19.11 and h11<maxh18.12 and h12<maxh17.13 and h13<maxh16.14 and h14<maxh15.15 and h15<maxh14.16 and h16<maxh13.17 and h17<maxh12.18 and h18<maxh11.19 and h19<maxh10.20 and h20<maxh9.21 or
 
 
H4=maxh26.4 and H5<maxh24.6 and h6<maxh23.7 and h7<maxh22.8 and h8<maxh21.9 and h9<maxh20.10 and h10<maxh19.11 and h11<maxh18.12 and h12<maxh17.13 and h13<maxh16.14 and h14<maxh15.15 and h15<maxh14.16 and h16<maxh13.17 and h17<maxh12.18 and h18<maxh11.19 and h19<maxh10.20 and h20<maxh9.21 or
 
H5=maxh25.5  and h6<maxh23.7 and h7<maxh22.8 and h8<maxh21.9 and h9<maxh20.10 and h10<maxh19.11 and h11<maxh18.12 and h12<maxh17.13 and h13<maxh16.14 and h14<maxh15.15 and h15<maxh14.16 and h16<maxh13.17 and h17<maxh12.18 and h18<maxh11.19 and h19<maxh10.20 and h20<maxh9.21 or
 
H6=maxh24.6 and h7<maxh22.8 and h8<maxh21.9 and h9<maxh20.10 and h10<maxh19.11 and h11<maxh18.12 and h12<maxh17.13 and h13<maxh16.14 and h14<maxh15.15 and h15<maxh14.16 and h16<maxh13.17 and h17<maxh12.18 and h18<maxh11.19 and h19<maxh10.20 and h20<maxh9.21 or
 
H7=maxh23.7 and  h8<maxh21.9 and h9<maxh20.10 and h10<maxh19.11 and h11<maxh18.12 and h12<maxh17.13 and h13<maxh16.14 and h14<maxh15.15 and h15<maxh14.16 and h16<maxh13.17 and h17<maxh12.18 and h18<maxh11.19 and h19<maxh10.20 and h20<maxh9.21 
 
Bruce_L
Posted : Wednesday, October 10, 2012 11:53:00 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

Put parantheses around each batch of ANDs that you want to OR together to force the ANDs to be first in the order of operations.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
mc7e
Posted : Wednesday, October 10, 2012 11:58:18 AM
Registered User
Joined: 3/8/2005
Posts: 23

Perfect!  Thanks Bruce

Bruce_L
Posted : Wednesday, October 10, 2012 12:03:23 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

You're welcome.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.