Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Help with PCF creation for TC2000 V12 Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
GSA15
Posted : Thursday, July 28, 2011 11:49:06 PM
Registered User
Joined: 9/27/2010
Posts: 17
Hi there, I am new to PCF code writing. Could someone help me with the pcf code for the following logic:Open > CloseOpen - Close is greater than the Open - Close of the any of the last bars over the previous 30 daysThe bar that meets the above criteria has a dot placed under it (or some way to identify that bar on the chart.Hope this makes sense. Any help would be great.Thanks
Bruce_L
Posted : Friday, July 29, 2011 8:14:09 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Taken literally, the formula would be:

O > C AND O - C > O1 - C1 AND O - C > O2 - C2 AND O - C > O3 - C3 AND O - C > O4 - C4 AND O - C > O5 - C5 AND O - C > O6 - C6 AND O - C > O7 - C7 AND O - C > O8 - C8 AND O - C > O9 - C9 AND O - C > O10 - C10 AND O - C > O11 - C11 AND O - C > O12 - C12 AND O - C > O13 - C13 AND O - C > O14 - C14 AND O - C > O15 - C15 AND O - C > O16 - C16 AND O - C > O17 - C17 AND O - C > O18 - C18 AND O - C > O19 - C19 AND O - C > O20 - C20 AND O - C > O21 - C21 AND O - C > O22 - C22 AND O - C > O23 - C23 AND O - C > O24 - C24 AND O - C > O25 - C25 AND O - C > O26 - C26 AND O - C > O27 - C27 AND O - C > O28 - C28 AND O - C > O29 - C29 AND O - C > O30 - C30

That said, I suspect you want the body of the current bar to be larger than the body of any of the previous 30-bars. If this is the case, the formula would actually be:

O > C AND O - C > ABS(O1 - C1) AND O - C > ABS(O2 - C2) AND O - C > ABS(O3 - C3) AND O - C > ABS(O4 - C4) AND O - C > ABS(O5 - C5) AND O - C > ABS(O6 - C6) AND O - C > ABS(O7 - C7) AND O - C > ABS(O8 - C8) AND O - C > ABS(O9 - C9) AND O - C > ABS(O10 - C10) AND O - C > ABS(O11 - C11) AND O - C > ABS(O12 - C12) AND O - C > ABS(O13 - C13) AND O - C > ABS(O14 - C14) AND O - C > ABS(O15 - C15) AND O - C > ABS(O16 - C16) AND O - C > ABS(O17 - C17) AND O - C > ABS(O18 - C18) AND O - C > ABS(O19 - C19) AND O - C > ABS(O20 - C20) AND O - C > ABS(O21 - C21) AND O - C > ABS(O22 - C22) AND O - C > ABS(O23 - C23) AND O - C > ABS(O24 - C24) AND O - C > ABS(O25 - C25) AND O - C > ABS(O26 - C26) AND O - C > ABS(O27 - C27) AND O - C > ABS(O28 - C28) AND O - C > ABS(O29 - C29) AND O - C > ABS(O30 - C30)

I don't know of a way to place dots in TC2000 version 11, but you could use the desired formula as a Custom PCF % True Indicator (with the Period set to 1). This would create a spike on the chart whenever the formula is true.

PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
GSA15
Posted : Friday, July 29, 2011 9:53:42 AM
Registered User
Joined: 9/27/2010
Posts: 17
Thanks Bruce
Bruce_L
Posted : Friday, July 29, 2011 10:00:14 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
You're welcome.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.