Gold Customer
Joined: 10/7/2004 Posts: 3
|
How do I write a PCF for the following condition: The 8dma that nearly equals the 20dma that nearly equals the 50dma.It is easy to write a PCF saying exacty but that never(or near never) happens. I need some 2-3% leaway.
Thank you
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The following Condition Formula would check for all three moving averages to be within 2% of each other:
(AVGC8 + AVGC20 + ABS(AVGC8 - AVGC20) + 2 * (AVGC50) + ABS(AVGC8 + AVGC20 + ABS(AVGC8 - AVGC20) - 2 * (AVGC50))) / (AVGC8 + AVGC20 - ABS(AVGC8 - AVGC20) + 2 * (AVGC50) - ABS(AVGC8 + AVGC20 - ABS(AVGC8 - AVGC20) - 2 * (AVGC50))) <= 1.02
You could change the 1.02 at the end of the formula to 1.03 to check for 3% instead.
Min Max PCFs
PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!
-Bruce Personal Criteria Formulas TC2000 Support Articles
|