Gold Customer
Joined: 9/26/2005 Posts: 22
|
Dear trainer,
I would like to get your help in writing a PCF for an "Island Reversal". The specific example is that of CAT on 7/20/07. The island has 1-10 bars and has a 6-12 month new high and two gaps. The fisrt gap is to the upside and the second is to the down side. The last gap is easy to define ie High today < yesterday's Low. I can not write the first gap as it can be in any one of the 1 to 10 days. Any help would be appreciated.
Thanks,
Joginder
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Please try the following:
H < L1 AND ((L1 > H2 AND H1 = MAXH126.1) OR (L2 > H3 AND MAXH2.1 = MAXH126.1) OR (L3 > H4 AND MAXH3.1 = MAXH126.1) OR (L4 > H5 AND MAXH4.1 = MAXH126.1) OR (L5 > H6 AND MAXH5.1 = MAXH126.1) OR (L6 > H7 AND MAXH6.1 = MAXH126.1) OR (L7 > H8 AND MAXH7.1 = MAXH126.1) OR (L8 > H9 AND MAXH8.1 = MAXH126.1) OR (L9 > H10 AND MAXH9.1 = MAXH126.1) OR (L10 > H11 AND MAXH10.1 = MAXH126.1))
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
|
Gold Customer
Joined: 9/26/2005 Posts: 22
|
Thanks Bruce.
Joginder
The first expression seems to be a typo. You probably meant H < L1.
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Corrected. Thanks for the catch. I was staring at the charts trying to figure out why it wasn't returning True for CAT on 7/20/07 when plotted as a Custom Percent True indicator when I read your post.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|