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

How to write a PCF of Moving Avg cross with custom formula Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
jcbrick
Posted : Sunday, December 5, 2010 11:22:09 AM
Registered User
Joined: 12/30/2004
Posts: 5
I'm trying to write a PCF which shows the crossover of a moving average and a custom formula.

The formula is avgc40/avgc40.20.

What is the format for a 10 day moving avg of that formula?  Can this be done in TC2007?

Thanks for your help.
Bruce_L
Posted : Monday, December 6, 2010 8:58:47 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
QUOTE (jcbrick)
The formula is avgc40/avgc40.20.

What is the format for a 10 day moving avg of that formula?

If the Moving Average is Simple:

(AVGC40 / AVGC40.20 + AVGC40.1 / AVGC40.21 + AVGC40.2 / AVGC40.22 + AVGC40.3 / AVGC40.23 + AVGC40.4 / AVGC40.24 + AVGC40.5 / AVGC40.25 + AVGC40.6 / AVGC40.26 + AVGC40.7 / AVGC40.27 + AVGC40.8 / AVGC40.28 + AVGC40.9 / AVGC40.29) / 10

QUOTE (jcbrick)
I'm trying to write a PCF which shows the crossover of a moving average and a custom formula.

Formula xUp its own SMA10:

9 * AVGC40 / AVGC40.20 > AVGC40.1 / AVGC40.21 + AVGC40.2 / AVGC40.22 + AVGC40.3 / AVGC40.23 + AVGC40.4 / AVGC40.24 + AVGC40.5 / AVGC40.25 + AVGC40.6 / AVGC40.26 + AVGC40.7 / AVGC40.27 + AVGC40.8 / AVGC40.28 + AVGC40.9 / AVGC40.29 AND 9 * AVGC40.1 / AVGC40.21 <= AVGC40.2 / AVGC40.22 + AVGC40.3 / AVGC40.23 + AVGC40.4 / AVGC40.24 + AVGC40.5 / AVGC40.25 + AVGC40.6 / AVGC40.26 + AVGC40.7 / AVGC40.27 + AVGC40.8 / AVGC40.28 + AVGC40.9 / AVGC40.29 + AVGC40.10 / AVGC40.30

Formula xDn its own SMA10:

9 * AVGC40 / AVGC40.20 < AVGC40.1 / AVGC40.21 + AVGC40.2 / AVGC40.22 + AVGC40.3 / AVGC40.23 + AVGC40.4 / AVGC40.24 + AVGC40.5 / AVGC40.25 + AVGC40.6 / AVGC40.26 + AVGC40.7 / AVGC40.27 + AVGC40.8 / AVGC40.28 + AVGC40.9 / AVGC40.29 AND 9 * AVGC40.1 / AVGC40.21 >= AVGC40.2 / AVGC40.22 + AVGC40.3 / AVGC40.23 + AVGC40.4 / AVGC40.24 + AVGC40.5 / AVGC40.25 + AVGC40.6 / AVGC40.26 + AVGC40.7 / AVGC40.27 + AVGC40.8 / AVGC40.28 + AVGC40.9 / AVGC40.29 + AVGC40.10 / AVGC40.30

Formula crossing its own SMA10 (either direction):

SGN(9 * AVGC40 / AVGC40.20 - AVGC40.1 / AVGC40.21 - AVGC40.2 / AVGC40.22 - AVGC40.3 / AVGC40.23 - AVGC40.4 / AVGC40.24 - AVGC40.5 / AVGC40.25 - AVGC40.6 / AVGC40.26 - AVGC40.7 / AVGC40.27 - AVGC40.8 / AVGC40.28 - AVGC40.9 / AVGC40.29) <> SGN(9 * AVGC40.1 / AVGC40.21 - AVGC40.2 / AVGC40.22 - AVGC40.3 / AVGC40.23 - AVGC40.4 / AVGC40.24 - AVGC40.5 / AVGC40.25 - AVGC40.6 / AVGC40.26 - AVGC40.7 / AVGC40.27 - AVGC40.8 / AVGC40.28 - AVGC40.9 / AVGC40.29 - AVGC40.10 / AVGC40.30)

How to create a Personal Criteria Forumula (PCF)
Moving Average PCF Templates
Things to check if your moving averages don't "seem right" or "seem to match"
PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!

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