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