Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 8/16/2009 Posts: 42
|
Hi all,
I'm looking for a PCF that is based on two EMAs and closing prices for the last couple weeks.The PCF criteria is:
1. 1. One 21 EMA based on price lows
2. 2 .One 21 EMA based on price highs
3. 3. The price closed at least five times within the 2 envelops in the last 2 weeks and today’s price is also between the 2 envelops.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Please try the following:
XAVGL21 <= C AND C <= XAVGH21 AND ABS(XAVGL21.1 <= C1 AND C1 <= XAVGH21.1) - (XAVGL21.2 <= C2 AND C2 <= XAVGH21.2) - (XAVGL21.3 <= C3 AND C3 <= XAVGH21.3) - (XAVGL21.4 <= C4 AND C4 <= XAVGH21.4) - (XAVGL21.5 <= C5 AND C5 <= XAVGH21.5) - (XAVGL21.6 <= C6 AND C6 <= XAVGH21.6) - (XAVGL21.7 <= C7 AND C7 <= XAVGH21.7) - (XAVGL21.8 <= C8 AND C8 <= XAVGH21.8) - (XAVGL21.9 <= C9 AND C9 <= XAVGH21.9) - (XAVGL21.10 <= C10 AND C10 <= XAVGH21.10) >= 5
It assumes it must be inside today and also inside during at least 5 of the previous 10-bars. If you want today included in either the 5 count or the 10-bars, it would need to be adjusted.
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: 8/16/2009 Posts: 42
|
>> It assumes it must be inside today and also inside during at least 5 of the previous 10-bars
Yes, that is what I'm looking for. I will give this a try and report back. Thanks Bruce!
|
|
Registered User Joined: 8/16/2009 Posts: 42
|
Looks like it is working. I can adjust it to fit my needs even more. Thanks again Bruce!
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |