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

MA distance Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Quiktdr
Posted : Thursday, November 29, 2012 8:53:20 AM
Registered User
Joined: 10/7/2004
Posts: 794

How do I write a PCF for distance between an exponential moving average and an ema of that ema.

 

For example   XAVGC3 > AVG(XAVGC3,3)

I am looking to guage when the distance constricts or expands between these two moving averages.

 

Also AVGC3 > AVG(XAVGC3,3)

 

Thank you in advance!

 

Bruce_L
Posted : Thursday, November 29, 2012 9:01:25 AM


Worden Trainer

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

The difference between XAVGC3 and AVG(XAVGC3,3) could be written as:

XAVGC3 - AVG(XAVGC3,3)

The absolute difference between XAVGC3 and AVG(XAVGC3,3) could be written as:

ABS(XAVGC3 - AVG(XAVGC3,3))

The percent difference (as a percentage of AVG(XAVGC3,3)) between XAVGC3 and AVG(XAVGC3,3) could be written as:

100 * (XAVGC3 / AVG(XAVGC3, 3) - 1)

The absolute percent difference between XAVGC3 and AVG(XAVGC3,3) could be written as:

100 * ABS(XAVGC3 / AVG(XAVGC3, 3) - 1)

Doing the same for the differences between AVGC3 and AVG(XAVGC3, 3) is just a matter of replacing the first XAVGC3 in each formula with AVGC3 instead.

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



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Quiktdr
Posted : Thursday, November 29, 2012 12:24:39 PM
Registered User
Joined: 10/7/2004
Posts: 794

Thank you!

Quiktdr
Posted : Tuesday, March 5, 2019 1:45:40 PM
Registered User
Joined: 10/7/2004
Posts: 794

Is there a way to write a pcf for the first time XAVGC3 > AVG(XAVGC3,3)  goes positive and signals with an up-bar?

Bruce_L
Posted : Tuesday, March 5, 2019 2:04:48 PM


Worden Trainer

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

If an up bar is the close being above the open.

C > O AND TrueInRow(XAVGC3 > AVG(XAVGC3,3)), 2) = 1

If an up bar is the close being above the previous close.

C > C1 AND TrueInRow(XAVGC3 > AVG(XAVGC3,3)), 2) = 1



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