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!
|
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
|
Registered User Joined: 10/7/2004 Posts: 794
|
Thank you!
|
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?
|
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
|