Registered User Joined: 12/3/2004 Posts: 7
|
I've been browsing the forums looking to code a PCF that will help find a temporary corrections in trend. Ideally the correction will have 5-8 bars with lower highs and lower lows. This is looking for a small correction within the context of a larger uptrend. I've tried setting this up but am not having much luck. I'm using a 20-day simple MA to help isolate the uptrend, but right now the 5-8 bars is the part where I'm stuck. Any advice? Thanks in advance.
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
If you need at least 5 lower Highs and Lows you could try the following:
H < H1 AND H1 < H2 AND H2 < H3 AND H3 < H4 AND H4 < H5 AND L < L1 AND L1 < L2 AND L2 < L3 AND L3 < L4 AND L4 < L5
If you need exactly 5 to 8 lower Highs and Lows, you could try the following instead:
H < H1 AND H1 < H2 AND H2 < H3 AND H3 < H4 AND H4 < H5 AND L < L1 AND L1 < L2 AND L2 < L3 AND L3 < L4 AND L4 < L5 AND (H5 > H6 OR H6 > H7 OR H7 > H8 OR H8 > H9 OR L5 > L6 OR L6 > L7 OR L7 > L8 OR L8 > L9)
You may wish to review the following:
How to create a Personal Criteria Forumula (PCF)
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: 12/3/2004 Posts: 7
|
Thanks so much for the quick response. I'll give them a try and tweek as needed.
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|