I have been copy/pasting directly from Word.
I then tried copy/paste from Word to Notepad to pcf and am still getting syntax error for 3 period pcf.
Very frustrating.
Don

Stockguy,
Now same syntax error with 3 period:
100 * LOG((3 * (AVGH3 AVGL3) + ABS(H  C1) + ABS(C1  L) + ABS(H1  C2) + ABS(C2  L1) + ABS(H2  C3) + ABS(C3  L2)) / (MAXH3 – MINL3 + ABS(MAXH3 – C3) + ABS(MINL3 – C3))) / LOG(3+0)
I still don't know how to prevent this and cannot get the above to work.
Thank you,
Don

Stockguy,
I tried again with a blank pcf and it now works.
Many thanks,
Don

Thank you Stockguy.
I have gotten the 8 period to work but now am consistently getting a syntax error for the 5 period with this pcf:
100 * LOG((5 * (AVGH5 AVGL5) + ABS(H  C1) + ABS(C1  L) + ABS(H1  C2) + ABS(C2  L1) + ABS(H2  C3) + ABS(C3  L2) + ABS(H3  C4) + ABS(C4  L3) + ABS(H4  C5) + ABS(C5  L4)) / (MAXH5 – MINL5 + ABS(MAXH5 – C5) + ABS(MINL5 – C5))) / LOG(5+0)
Does the above 5 period work for you?
Thank you for your help.
Don

I wanted to continue on this thread even though I am not using v 7 but v 12.5

Bruce,
I tried to shorten the above pcf to create one for 8 periods and keep getting an error.
The 14 period pcf above works great.
My pcf below does not work.
100 * LOG((8 * (AVGH8 – AVGL8) + ABS(H  C1) + ABS(C1  L) + ABS(H1  C2) + ABS(C2  L1) + ABS(H2  C3) + ABS(C3  L2) + ABS(H3  C4) + ABS(C4  L3) + ABS(H4  C5) + ABS(C5  L4) + ABS(H5  C6) + ABS(C6  L5) + ABS(H6  C7) + ABS(C7  L6) + ABS(H7  C8) + ABS(C8  L7)) / (MAXH8 – MINL8 + ABS(MAXH8 – C8) + ABS(MINL8 – C8))) / LOG(8+0)
Please fix this and also provide a pcf for 5 periods.
Thank you,
Don

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
