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 Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
jgriffith
Posted : Monday, September 11, 2006 3:29:00 PM
Registered User
Joined: 8/9/2005
Posts: 5
I have written a pcf that is supposed to return stocks which have at least matched the 30 day high in the last 10 days and then closed below the 10 and 20 day simple moving averages. Unfortunately, I also get some stocks which don't meet my criteria, but are "close". I can't figure out where my mistake is in the following formula:

((MAXH10) = (MAXH30)) AND (( < (AVGC10)) AND ( < AVGC20)))

Some of the returns are stocks which have closed below the 10, but not the 20.
agcy and gisx (as of yesterday) are examples of this. agcy is now below, but it wasn't yesterday when I got the return.

Thankyou for your help.

John

Craig_S
Posted : Monday, September 11, 2006 3:47:33 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Lets start by simplifying your PCF a bit

MAXH10=MAXH30 AND C<AVGC10 AND C<AVGC20

I will assume agcy is actually ACGY

Based on the 9/8 close:

ACGY met your conditions

MAXH10=19.12
MAXH30=19.12
C=17.64
AVGC10=18.101
AVGC20=17.6865

GISX also meets your condtions

MAXH10=22.21
MAXH30=22.21
C=21.41
AVGC10=21.631
AVGC20=21.4345

Go through this checklist to see why your plotted moving averages are not confirming your PCF. Keep in mind your PCF is for simple moving averages.

Things to check if your moving averages don't "seem right" or "seem to match"

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