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

Front weighted MA PCF Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
wayneuk69
Posted : Monday, October 17, 2011 8:06:01 PM
Registered User
Joined: 7/11/2010
Posts: 12
Does anyone know what I should write to use front weighted moving averages in pcfs?
Bruce_L
Posted : Tuesday, October 18, 2011 8:31:35 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Front Weighted Moving Averages are not built into the Personal Criteria Formula Language. A 2-Period Front Weighted Moving Average could be written as:

(2 * C + C1) / 3

A 3-Period Front Weighted Moving Average could be written as:

(3 * C + 2 * C1 + C2) / 6

A 4-Period Front Weighted Moving Average could be written as:

(4 * C + 3 * C1 + 2 * C2 + C3) / 10

A 5-Period Front Weighted Moving Average could be written as:

(5 * C + 4 * C1 + 3 * C2 + 2 * C3 + C4) / 15

A 6-Period Front Weighted Moving Average could be written as:

(6 * C + 5 * C1 + 4 * C2 + 3 * C3 + 2 * C4 + C5) / 21

A 7-Period Front Weighted Moving Average could be written as:

(7 * C + 6 * C1 + 5 * C2 + 4 * C3 + 3 * C4 + 2 * C5 + C6) / 28

An 8-Period Front Weighted Moving Average could be written as:

(8 * C + 7 * C1 + 6 * C2 + 5 * C3 + 4 * C4 + 3 * C5 + 2 * C6 + C7) / 36

A 9-Period Front Weighted Moving Average could be written as:

(9 * C + 8 * C1 + 7 * C2 + 6 * C3 + 5 * C4 + 4 * C5 + 3 * C6 + 2 * C7 + C8) / 45

A 10-Period Front Weighted Moving Average could be written as:

(10 * C + 9 * C1 + 8 * C2 + 7 * C3 + 6 * C4 + 5 * C5 + 4 * C6 + 3 * C7 + 2 * C8 + C9) / 55

The basic pattern continues as the period increases.

PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
wayneuk69
Posted : Sunday, October 30, 2011 2:25:32 PM
Registered User
Joined: 7/11/2010
Posts: 12
Thanks for those
sloop22
Posted : Wednesday, February 12, 2014 1:57:04 PM
Registered User
Joined: 12/5/2007
Posts: 29

Dear Trainer

Using the The formula for a 10-Period Front Weighted Moving Average as:

(10 * C + 9 * C1 + 8 * C2 + 7 * C3 + 6 * C4 + 5 * C5 + 4 * C6 + 3 * C7 + 2 * C8 + C9) / 55 for example
 

How do we write a 5 period front weighted moving average for the 10 period front weighted moving average as an example.

I'am stuck. Couldn't find anthing in the search for this.

 

Thanks in advance.

Sloop22

Bruce_L
Posted : Wednesday, February 12, 2014 2:09:22 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

You would need to manually substitute the values of the FWMA5 into the FWMA10 or the other way around (it ends up being the same thing). So a FWMA5 of an FWMA10 could be written as:

(5 * (10 * C + 9 * C1 + 8 * C2 + 7 * C3 + 6 * C4 + 5 * C5 + 4 * C6 + 3 * C7 + 2 * C8 + C9) / 55 + 4 * (10 * C1 + 9 * C2 + 8 * C3 + 7 * C4 + 6 * C5 + 5 * C6 + 4 * C7 + 3 * C8 + 2 * C9 + C10) / 55 + 3 * (10 * C2 + 9 * C3 + 8 * C4 + 7 * C5 + 6 * C6 + 5 * C7 + 4 * C8 + 3 * C9 + 2 * C10 + C11) / 55 + 2 * (10 * C3 + 9 * C4 + 8 * C5 + 7 * C6 + 6 * C7 + 5 * C8 + 4 * C9 + 3 * C10 + 2 * C11 + C12) / 55 + (10 * C4 + 9 * C5 + 8 * C6 + 7 * C7 + 6 * C8 + 5 * C9 + 4 * C10 + 3 * C11 + 2 * C12 + C13) / 55) / 15

But we can shorten this because a lot of the terms are duplicated.

(50 * C + 85 * C1 + 106 * C2 + 114 * C3 + 110 * C4 + 95 * C5 + 80 * C6 + 65 * C7 + 50 * C8 + 35 * C9 + 20 * C10 + 10 * C11 + 4 * C12 + C13) / 825



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
sloop22
Posted : Wednesday, February 12, 2014 2:22:49 PM
Registered User
Joined: 12/5/2007
Posts: 29

Thanks Bruce your the best.

 

I can see it and understand how it is done.

 

Thanks again.

Sloop22

Bruce_L
Posted : Wednesday, February 12, 2014 2:40:37 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

You're welcome.



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