Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 12/11/2004 Posts: 15
|
How can I write a PCF for the following: Avg daily range of +4 pts over 3 days so it equals true???
Thanks, Ed
|
|
Registered User Joined: 1/28/2005 Posts: 6,049
|
Try:
(AVGH3-AVGL3>=4)AND(AVGH3.1-AVGL3.1>=4)AND(AVGH3.2-AVGL3.2>=4)
Thanks diceman
|
|
Registered User Joined: 1/28/2005 Posts: 6,049
|
oleeddie
I had not yet read the Worden report.
The version supplied in the report was:
((H-L)+(H1-L1)+(H2-L2))/3>4
Thanks diceman
|
|
Registered User Joined: 10/7/2004 Posts: 1,006
|
You may also be interested to try a math PCF, adjust the range selector value to your desired average H-L range. It takes the absolute H-L for each day, adds them together and divide by 3 for the average H-L range.
3 Day Average H-L Range
(ABS(H2 - L2) + ABS(H1 - L1) + ABS(H - L)) /3
Thanks Winnie
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
Here is the easiest way to write this:
AVGH3-AVGL3
We don't need ABS() b/c the low can never be greater than the high.
- Craig Here to Help!
|
|
Registered User Joined: 7/23/2006 Posts: 29
|
Craig,
Really appreciate your responses to PCF questions. For those of us who are just learning can you add a sentence describing what the equation is doing?? Probably not necessary for most but would be a help for the new guys (like me). Thank you...
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
o280949, AVGH3 is the 3-Period Simple Moving Average of the High. AVGL3 is the 3-Period Simple Moving Average of the Low. The formula subtracts the two to get the 3-Period Simple Moving Average of Range. You may wish to review the following:
How to create a Personal Criteria Forumula (PCF) Handy PCF example formulas to help you learn the syntax of PCFs! Personal Criteria Language Function List
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 1/1/2005 Posts: 2,645
|
Bruce,
My guess is that using linearity to get:
AVG(H-L,3) = AVGH3-AVGL3
is the problem most have.
That may be the reason Sir Never-Bored wrote the average range term-by-term.
Thanks, Jim Murphy
|
|
Guest-1 |