Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Gold Customer
Joined: 12/5/2005 Posts: 63
|
Hi Bruce:
Please help me to write two PCFs for the following condition.
1) Today's volume is greater than the largest down-volume day over the prior 10 days.
2) The largest Up-volume over the prior 10 days is greater than the largest Down-volume over the prior 10 days.
Thank you!
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
QUOTE (auchang929) Today's volume is greater than the largest down-volume day over the prior 10 days.
V > V1 * ABS(C1 < C2) AND V > V2 * ABS(C2 < C3) AND V > V3 * ABS(C3 < C4) AND V > V4 * ABS(C4 < C5) AND V > V5 * ABS(C5 < C6) AND V > V6 * ABS(C6 < C7) AND V > V7 * ABS(C7 < C8) AND V > V8 * ABS(C8 < C9) AND V > V9 * ABS(C9 < C10) AND V > V10 * ABS(C10 < C11)
QUOTE (auchang929) The largest Up-volume over the prior 10 days is greater than the largest Down-volume over the prior 10 days.
(V1 * ABS(C1 > C2) + V2 * ABS(C2 > C3) + ABS(V1 * ABS(C1 > C2) - V2 * ABS(C2 > C3)) + 2 * (V3 * ABS(C3 > C4)) + ABS(V1 * ABS(C1 > C2) + V2 * ABS(C2 > C3) + ABS(V1 * ABS(C1 > C2) - V2 * ABS(C2 > C3)) - 2 * (V3 * ABS(C3 > C4))) + 2 * (V4 * ABS(C4 > C5) + V5 * ABS(C5 > C6) + ABS(V4 * ABS(C4 > C5) - V5 * ABS(C5 > C6))) + ABS(V1 * ABS(C1 > C2) + V2 * ABS(C2 > C3) + ABS(V1 * ABS(C1 > C2) - V2 * ABS(C2 > C3)) + 2 * (V3 * ABS(C3 > C4)) + ABS(V1 * ABS(C1 > C2) + V2 * ABS(C2 > C3) + ABS(V1 * ABS(C1 > C2) - V2 * ABS(C2 > C3)) - 2 * (V3 * ABS(C3 > C4))) - 2 * (V4 * ABS(C4 > C5) + V5 * ABS(C5 > C6) + ABS(V4 * ABS(C4 > C5) - V5 * ABS(C5 > C6)))) + V6 * ABS(C6 > C7) + V7 * ABS(C7 > C8) + ABS(V6 * ABS(C6 > C7) - V7 * ABS(C7 > C8)) + 2 * (V8 * ABS(C8 > C9)) + ABS(V6 * ABS(C6 > C7) + V7 * ABS(C7 > C8) + ABS(V6 * ABS(C6 > C7) - V7 * ABS(C7 > C8)) - 2 * (V8 * ABS(C8 > C9))) + 2 * (V9 * ABS(C9 > C10) + V10 * ABS(C10 > C11) + ABS(V9 * ABS(C9 > C10) - V10 * ABS(C10 > C11))) + ABS(V6 * ABS(C6 > C7) + V7 * ABS(C7 > C8) + ABS(V6 * ABS(C6 > C7) - V7 * ABS(C7 > C8)) + 2 * (V8 * ABS(C8 > C9)) + ABS(V6 * ABS(C6 > C7) + V7 * ABS(C7 > C8) + ABS(V6 * ABS(C6 > C7) - V7 * ABS(C7 > C8)) - 2 * (V8 * ABS(C8 > C9))) - 2 * (V9 * ABS(C9 > C10) + V10 * ABS(C10 > C11) + ABS(V9 * ABS(C9 > C10) - V10 * ABS(C10 > C11)))) + ABS(V1 * ABS(C1 > C2) + V2 * ABS(C2 > C3) + ABS(V1 * ABS(C1 > C2) - V2 * ABS(C2 > C3)) + 2 * (V3 * ABS(C3 > C4)) + ABS(V1 * ABS(C1 > C2) + V2 * ABS(C2 > C3) + ABS(V1 * ABS(C1 > C2) - V2 * ABS(C2 > C3)) - 2 * (V3 * ABS(C3 > C4))) + 2 * (V4 * ABS(C4 > C5) + V5 * ABS(C5 > C6) + ABS(V4 * ABS(C4 > C5) - V5 * ABS(C5 > C6))) + ABS(V1 * ABS(C1 > C2) + V2 * ABS(C2 > C3) + ABS(V1 * ABS(C1 > C2) - V2 * ABS(C2 > C3)) + 2 * (V3 * ABS(C3 > C4)) + ABS(V1 * ABS(C1 > C2) + V2 * ABS(C2 > C3) + ABS(V1 * ABS(C1 > C2) - V2 * ABS(C2 > C3)) - 2 * (V3 * ABS(C3 > C4))) - 2 * (V4 * ABS(C4 > C5) + V5 * ABS(C5 > C6) + ABS(V4 * ABS(C4 > C5) - V5 * ABS(C5 > C6)))) - V6 * ABS(C6 > C7) - V7 * ABS(C7 > C8) - ABS(V6 * ABS(C6 > C7) - V7 * ABS(C7 > C8)) - 2 * (V8 * ABS(C8 > C9)) - ABS(V6 * ABS(C6 > C7) + V7 * ABS(C7 > C8) + ABS(V6 * ABS(C6 > C7) - V7 * ABS(C7 > C8)) - 2 * (V8 * ABS(C8 > C9))) - 2 * (V9 * ABS(C9 > C10) + V10 * ABS(C10 > C11) + ABS(V9 * ABS(C9 > C10) - V10 * ABS(C10 > C11))) - ABS(V6 * ABS(C6 > C7) + V7 * ABS(C7 > C8) + ABS(V6 * ABS(C6 > C7) - V7 * ABS(C7 > C8)) + 2 * (V8 * ABS(C8 > C9)) + ABS(V6 * ABS(C6 > C7) + V7 * ABS(C7 > C8) + ABS(V6 * ABS(C6 > C7) - V7 * ABS(C7 > C8)) - 2 * (V8 * ABS(C8 > C9))) - 2 * (V9 * ABS(C9 > C10) + V10 * ABS(C10 > C11) + ABS(V9 * ABS(C9 > C10) - V10 * ABS(C10 > C11)))))) / 16 > (V1 * ABS(C1 < C2) + V2 * ABS(C2 < C3) + ABS(V1 * ABS(C1 < C2) - V2 * ABS(C2 < C3)) + 2 * (V3 * ABS(C3 < C4)) + ABS(V1 * ABS(C1 < C2) + V2 * ABS(C2 < C3) + ABS(V1 * ABS(C1 < C2) - V2 * ABS(C2 < C3)) - 2 * (V3 * ABS(C3 < C4))) + 2 * (V4 * ABS(C4 < C5) + V5 * ABS(C5 < C6) + ABS(V4 * ABS(C4 < C5) - V5 * ABS(C5 < C6))) + ABS(V1 * ABS(C1 < C2) + V2 * ABS(C2 < C3) + ABS(V1 * ABS(C1 < C2) - V2 * ABS(C2 < C3)) + 2 * (V3 * ABS(C3 < C4)) + ABS(V1 * ABS(C1 < C2) + V2 * ABS(C2 < C3) + ABS(V1 * ABS(C1 < C2) - V2 * ABS(C2 < C3)) - 2 * (V3 * ABS(C3 < C4))) - 2 * (V4 * ABS(C4 < C5) + V5 * ABS(C5 < C6) + ABS(V4 * ABS(C4 < C5) - V5 * ABS(C5 < C6)))) + V6 * ABS(C6 < C7) + V7 * ABS(C7 < C8) + ABS(V6 * ABS(C6 < C7) - V7 * ABS(C7 < C8)) + 2 * (V8 * ABS(C8 < C9)) + ABS(V6 * ABS(C6 < C7) + V7 * ABS(C7 < C8) + ABS(V6 * ABS(C6 < C7) - V7 * ABS(C7 < C8)) - 2 * (V8 * ABS(C8 < C9))) + 2 * (V9 * ABS(C9 < C10) + V10 * ABS(C10 < C11) + ABS(V9 * ABS(C9 < C10) - V10 * ABS(C10 < C11))) + ABS(V6 * ABS(C6 < C7) + V7 * ABS(C7 < C8) + ABS(V6 * ABS(C6 < C7) - V7 * ABS(C7 < C8)) + 2 * (V8 * ABS(C8 < C9)) + ABS(V6 * ABS(C6 < C7) + V7 * ABS(C7 < C8) + ABS(V6 * ABS(C6 < C7) - V7 * ABS(C7 < C8)) - 2 * (V8 * ABS(C8 < C9))) - 2 * (V9 * ABS(C9 < C10) + V10 * ABS(C10 < C11) + ABS(V9 * ABS(C9 < C10) - V10 * ABS(C10 < C11)))) + ABS(V1 * ABS(C1 < C2) + V2 * ABS(C2 < C3) + ABS(V1 * ABS(C1 < C2) - V2 * ABS(C2 < C3)) + 2 * (V3 * ABS(C3 < C4)) + ABS(V1 * ABS(C1 < C2) + V2 * ABS(C2 < C3) + ABS(V1 * ABS(C1 < C2) - V2 * ABS(C2 < C3)) - 2 * (V3 * ABS(C3 < C4))) + 2 * (V4 * ABS(C4 < C5) + V5 * ABS(C5 < C6) + ABS(V4 * ABS(C4 < C5) - V5 * ABS(C5 < C6))) + ABS(V1 * ABS(C1 < C2) + V2 * ABS(C2 < C3) + ABS(V1 * ABS(C1 < C2) - V2 * ABS(C2 < C3)) + 2 * (V3 * ABS(C3 < C4)) + ABS(V1 * ABS(C1 < C2) + V2 * ABS(C2 < C3) + ABS(V1 * ABS(C1 < C2) - V2 * ABS(C2 < C3)) - 2 * (V3 * ABS(C3 < C4))) - 2 * (V4 * ABS(C4 < C5) + V5 * ABS(C5 < C6) + ABS(V4 * ABS(C4 < C5) - V5 * ABS(C5 < C6)))) - V6 * ABS(C6 < C7) - V7 * ABS(C7 < C8) - ABS(V6 * ABS(C6 < C7) - V7 * ABS(C7 < C8)) - 2 * (V8 * ABS(C8 < C9)) - ABS(V6 * ABS(C6 < C7) + V7 * ABS(C7 < C8) + ABS(V6 * ABS(C6 < C7) - V7 * ABS(C7 < C8)) - 2 * (V8 * ABS(C8 < C9))) - 2 * (V9 * ABS(C9 < C10) + V10 * ABS(C10 < C11) + ABS(V9 * ABS(C9 < C10) - V10 * ABS(C10 < C11))) - ABS(V6 * ABS(C6 < C7) + V7 * ABS(C7 < C8) + ABS(V6 * ABS(C6 < C7) - V7 * ABS(C7 < C8)) + 2 * (V8 * ABS(C8 < C9)) + ABS(V6 * ABS(C6 < C7) + V7 * ABS(C7 < C8) + ABS(V6 * ABS(C6 < C7) - V7 * ABS(C7 < C8)) - 2 * (V8 * ABS(C8 < C9))) - 2 * (V9 * ABS(C9 < C10) + V10 * ABS(C10 < C11) + ABS(V9 * ABS(C9 < C10) - V10 * ABS(C10 < C11)))))) / 16
How to create a Personal Criteria Forumula (PCF)
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
|
|
Gold Customer
Joined: 12/5/2005 Posts: 63
|
Thank you very much!
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |