Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 12/10/2004 Posts: 8
|
This is today's close minus 2 times ATR(10).I need this formula to indicate the highest level reached for a period of 15 days. I assume U would need to use the MAXH function, but how do I use it with the following PCF....
(C - 2 * ( ((((H - L) + (H1 - L1) + (H2 - L2) + (H3 - L3) + (H4 - L4) + (H5 - L5) + (H6 - L6) + (H7 - L7) + (H8 - L8) + (H9 - L9)) / 10) + (((C1 - H) + (C2 - H1) + (C3 - H2) + (C4 - H3) + (C5 - H4) + (C5 - H5) + (C6 - H6) + (C7 - H7) + (C8 - H8) + (C9 - H9)) / 10) + (((C1 - L) + (C2 - L1) + (C3 - L2) + (C4 - L3) + (C5 - L4) + (C6 - 5) + (C7 - L6) + (C8 - L7) + (C9 - L8) + (C10 - L9)) / 10)) / 3))
here is the metastock equivelent...HHV(C-2*ATR(10),15)
thanx, dennis
|
|

 Worden Trainer
Joined: 10/1/2004 Posts: 4,308
|
Dennis:
If this is possible, one of the other trainers will need to look at it. Someone will post back here to let you know!
- Doug Teaching Online!
|
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
It's possible. I think variations of your formula would have to be repeated about 225 times, resulting in a formula of 60,000+ characters. It would probably have a significant impact on performance. If you are still interested, I'll write it up, but it will take some time and probably won’t get posted yet today.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 12/10/2004 Posts: 8
|
any help would be appreciated...
thanx
|
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I spent quite a bit of time working on your formula. Unfortunately, I wasn't able to find a way to do a MAX of ATR efficiently in TeleChart's PCF language. However, I did notice a few things you might want to take a look at while working on it and came up with a slightly different formula for today's close minus 2 times ATR(10):
C-AVGH10+AVGL10-(ABS(H-C1)+ABS(L-C1)+ABS(H1-C2)+ABS(L1-C2)+ABS(H2-C3)+ABS(L2-C3)+ABS(H3-C4)+ABS(L3-C4)+ABS(H4-C5)+ABS(L4-C5)+ABS(H5-C6)+ABS(L5-C6)+ABS(H6-C7)+ABS(L6-C7)+ABS(H7-C8)+ABS(L7-C8)+ABS(H8-C9)+ABS(L8-C9)+ABS(H9-C10)+ABS(L9-C10))/10
It uses the built in AVG functions to simplify the first section of your formula, fixes the point in the second section of your formula where Close doesn't increment while High does (C5-H4)+(C5-H5), adds in a Low where it appeared to be missing (C6 - 5), and uses ABS functions to properly take into account the three possible relationships between H, L and C1. I'm sorry I wasn't able to produce the formula you requested, but hope the variation on your original formula will prove useful.
Maybe somebody else has a more efficient method for finding MAX than the two methods I tried.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 12/10/2004 Posts: 8
|
Bruce, thank you very much for your effort...you guys are the best!
Dennis
|
|
Guest-1 |