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

PCF Condition Question Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
grimmer01
Posted : Wednesday, April 4, 2012 3:05:53 PM
Registered User
Joined: 2/24/2005
Posts: 58

Hi All, 

is there a way to have a PCF calcuate the close of a recent high? for example, lets say my PCF contains the following:

MaxH4

is there any wat to determine if the Close of whatever MaxH4 is, to be greater than the previous close?

I hope this makes sense.  

for an example, looking at AIG and its 5' candlestick chart at 2:45 PM EST, is there a way to determine if that bar's close (because at the time i was looking at (i.e. 3:00 PM EST) it was the maxH4) is greater than the current closing bar's price?

thanks in advnace. 

 

Will

Bruce_L
Posted : Wednesday, April 4, 2012 3:19:21 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

You could use the techniques in Days Since Last Peak (or other day-counting needs) to create an Indicator Formula which would return the Close of most recent bar in the most recent 4-bars which had a high equal to the current MAXH4:

ABS(H = MAXH4) * C + ABS(H < MAXH4) * (ABS(H1 = MAXH4) * C1 + ABS(H1 < MAXH4) * (ABS(H2 = MAXH4) * C2 + ABS(H2 < MAXH4) * (ABS(H3 = MAXH4) * C3)))

So a formula to test if the close of that bar is higher than the current value (or close if the current bar is complete) would be:

ABS(H = MAXH4) * C + ABS(H < MAXH4) * (ABS(H1 = MAXH4) * C1 + ABS(H1 < MAXH4) * (ABS(H2 = MAXH4) * C2 + ABS(H2 < MAXH4) * (ABS(H3 = MAXH4) * C3))) > C

Note that MAXH4 includes the current bar in its calculations. So this can only be true if the current bar is also not the most recent bar with its high at the current MAXH4.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
grimmer01
Posted : Wednesday, April 4, 2012 3:27:16 PM
Registered User
Joined: 2/24/2005
Posts: 58

Wow Bruce, you are blowing my mind with that equation...LOL.  That equation is above my pay grade...LOL. i will have to read that one a few times to wrap my brain around it.  Good Stuff!  

you may be answering my question with the above formula, but let me try to rephrase my question (i.e. dumb it down for me), just so I know we are on the same page.

is there a way to write a PCF to determine if MaxC4 is from the same Bar of MaxH4?

thanks again. and thanks for the fast reply!  

Greatly appreciated!  

 

Will

Bruce_L
Posted : Wednesday, April 4, 2012 3:30:51 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

Yes, and I think it will be a bit simpler to understand.

(C = MAXC4 AND H = MAXH4) OR (C1 = MAXC4 AND H1 = MAXH4) OR (C2 = MAXC4 AND H2 = MAXH4) OR (C3 = MAXC4 AND H3 = MAXH4)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
grimmer01
Posted : Wednesday, April 4, 2012 3:55:58 PM
Registered User
Joined: 2/24/2005
Posts: 58

Great, Thanks again Bruce!  Looks good, running it and testing it out now!

you never seize to impress me!

 

Will

Bruce_L
Posted : Wednesday, April 4, 2012 3:56:38 PM


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.