Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 11/8/2004 Posts: 41
|
I am trying to find stocks that have just closed above their 20 and 40 day moving average. The following PCF is not getting any hits. Can you tell me what the problem might be?
(((C > AVGC20) AND (C > AVGC40)) AND ((C < AVGC20.1) AND (C < AVGC40.1)))
Thanks
Alabama Trader
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
Lets start by cleaning it up... and comparing the close yesterday to the averages yesterday. You were only looking at the closes today.
C>AVGC20 AND C>AVGC40 AND C1<AVGC20.1 AND C1<AVGC40.1
See if this works better for you.
- Craig Here to Help!
|
|
Registered User Joined: 11/8/2004 Posts: 41
|
Oops
Thanks for the help.
Alabama Trader
P.S. It appears that the sequence of execution is from left to right. Is this correct? What is the hierarchy in a PCF and what role does the parenthesis play in the hierarchy?
Thanks again
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
In the case of this PCF the order does not matter.
Here is where it does matter:
PCF 1
(H*L)-C
PCF 2
H*(L-C)
The parenthesis force the L-C to go first in PCF1 and the H*L in PCF2
- Craig Here to Help!
|
|
Guest-1 |