donv98 
Gold User, Member, TeleChart

Registered User 




Gender: 

Thursday, July 29, 2010 
Tuesday, May 16, 2017 2:36:40 PM 
359 [0.13% of all post / 0.14 posts per day] 

Bruce,
Many thanks for sharing the nuances of these functions.
I really appreciate your patient, detailed responses.
TrueInRow(XAVGC8.1 > XAVGC2.1,50) = 5
Does this check for occurences of the condition being true exactly 5 consecutive bars over the previous 50?
TrueInRow(XAVGC8.1 > XAVGC2.1,50) >5
Does this check for occurences of the condition being true > 5 consecutive bars over the previous 50?
Don

"How do I specify that a condition has been true each instance for the previous X bars?"
Is this how?
CountTrue(XAVGC8.1 > XAVGC2.1, X) = X

QUOTE (Bruce_L)
We have already checked for the current bar being above with the following.
XAVGC8 > XAVGC2
The next part:
TrueInRow(XAVGC8.1 > XAVGC2.1, 5) < 5
Just checks to make sure 8 ema has not been continuously above 2 ema for the previous 5 bars as well.
Very helpful Bruce.
I was again composing while you were posting this so I didn't see it.
don

Bruce,
How do I specify that a condition has been true each instance for the previous X bars,
...what I was erroneously thinking TrueInRow did?
CountTrue(b, x) > Will return the number of times Boolean formula was true in the period
CountTrue(XAVGC8.1 > XAVGC2.1, X) tells me the number of times the condition has been true for the previous X bars
TrueInRow(b, x) > Will return a value between 0 and period that is how many times the Boolean formula was true in a row
TrueInRow(XAVGC8.1 > XAVGC2.1, X
"It returns the number of bars in a row the condition has been true over the most recent X bars. This value can range from 0 to X."
Thank you.
Don

Bruce,
Sorry, I was writing the above post before you corrected my error with your post.
Don

TrueInRow(XAVGC8.1 > XAVGC2.1, 5) < 5
does this mean the condition has become true sometime within the past 5 bars,
ie. <5?
ie: on the 0 or 1 or 2 or 3 or 4 bar.

Bruce,
Many thanks for your very fine work.
I don't understand why we have to manually check for the 8ema below the 2ema in V12 but not in V17.
I guess I don't understand this:
TrueInRow(XAVGC8.1 > XAVGC2.1, 5) < 5
TrueInRow(XAVGC8.1 > XAVGC2.1, 5) tells me the condition has been true for the previous 5 bars...
I don't understand the <5 part of it.
It seems to specify the false condition ie 8ema below 2ema on the bar prior to that but I am not understanding it.
Thank you for helping.
Don

"8ema rising and 8ema staying above the 2ema after the cross"
I just realized I probably only need one or the other of these 2 conditions.
Don

I want to document this elegant counting bar pcf given in the v17 video here at about 14:40:
http://www.tc2000.com/features/whatsnew17
TrueInRow(C>C1,50)TrueInRow(C<C1,50)
provides number of bars in a row a condition is true and because of the way this is written, this pcf outputs BOTH up and down bars in the same pcf.
The same solution I think could be applied to any counting bar situation where a user want both situations.

Hi Bruce,
How can I construct a pcf for 8ema crossing 2ema up and 8ema rising and 8ema staying above the 2ema after the cross?
I would like the 8ema cross and subsequent to occur within the past let's say 5 bars.
Please do this for both v12 and v17.
I am guessing it is not possible with v12.
I assume in v17 I can then use this in a column.
Is there anything created in v17 that can't be used in a column?
Also, I noticed I now have to log into the discusssion forum even though I am already logged in to v12 web browser. I used to be automatically logged in and prefer that to having to log in 2X.
Many thanks for any help.
Don

