Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

PCF not getting any hits. Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Alabama Trader
Posted : Monday, August 20, 2007 11:14:00 PM
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
Craig_S
Posted : Tuesday, August 21, 2007 4:22:57 AM


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!
Alabama Trader
Posted : Wednesday, August 22, 2007 4:36:52 PM
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
Craig_S
Posted : Wednesday, August 22, 2007 4:39:12 PM


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!
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.