Registered User Joined: 3/24/2005 Posts: 72

SYMBOL: ALVR DATE OF CLOSE 5/2/2012
User 6373
*Part A written formula
*Part B Result of test  show true even though many parts of the PCF are false.
However if certain parts are deleted the result is true.
Can you please review my formula and tell me what I am doing wrong?
===============================================================
(AVGH5.1 + AVGL5.1) / 2 > (AVGH5.2 + AVGL5.2) / 2
AND (AVGH9.1 + AVGL9.1) / 2 > (AVGH9.2 + AVGL9.2) / 2
AND H1 > H2
AND H2 > H3
AND L1 > L2
AND L2 > L3
AND C1 > (H2 + L2) / 2
AND C2 > (H3 + L3) / 2
AND C3 > (H4 + L4) / 2
AND C1 > (MAXH3.1 + MINL3.1) / 2
AND (AVGH45.1 + AVGL45.1) / 2 > (AVGH45.2 + AVGL45.2) / 2
AND C 1> (AVGH45.1 + AVGL45.1) / 2
AND L < L1

(0.79 + 0.73) / 2.00 > (0.82 + 0.76) / 2.00 AND (0.79 + 0.73) / 2.00 > (0.78 + 0.72) / 2.00 AND 0.72 > 0.77 AND 0.77 > 0.80 AND 0.67 > 0.75 AND 0.75 > 0.77 AND 0.69 > (0.77 + 0.75) / 2.00 AND 0.75 > (0.80 + 0.77) / 2.00 AND 0.79 > (0.80 + 0.74) / 2.00 AND 0.69 > (0.80 + 0.67) / 2.00 AND (0.87 + 0.83) / 2.00 > (0.88 + 0.83) / 2.00 AND 0.65 1.00 > (0.87 + 0.83) / 2.00 AND 0.65 < 0.67
Result is true


Worden Trainer
Joined: 10/7/2004 Posts: 51,580

Getting rid of the extra spaces and line breaks seems to resolve the issue:
(AVGH5.1 + AVGL5.1) / 2 > (AVGH5.2 + AVGL5.2) / 2 AND (AVGH9.1 + AVGL9.1) / 2 > (AVGH9.2 + AVGL9.2) / 2 AND H1 > H2 AND H2 > H3 AND L1 > L2 AND L2 > L3 AND C1 > (H2 + L2) / 2 AND C2 > (H3 + L3) / 2 AND C3 > (H4 + L4) / 2 AND C1 > (MAXH3.1 + MINL3.1) / 2 AND (AVGH45.1 + AVGL45.1) / 2 > (AVGH45.2 + AVGL45.2) / 2 AND C1 > (AVGH45.1 + AVGL45.1) / 2 AND L < L1
Bruce


Registered User Joined: 3/24/2005 Posts: 72

I am not sure what you mean about extra spaces and line breaks. I do not have any extra space or line breaks.
George


Worden Trainer
Joined: 10/7/2004 Posts: 51,580

Look at the format of your formula as given in your post.
Look at the format of your formula as given in my post.
They are different. Your version has both line breaks between the formula components and extra spaces that mine does not.
When I copy and paste your version of the formula it doesn't work.
When I copy and paste my version of the formula it does work.
Bruce


Registered User Joined: 3/24/2005 Posts: 72


(AVGH5 + AVGL5) / 2 > (AVGH5.1 + AVGL5.1) / 2 AND (AVGH9 + AVGL9) / 2 > (AVGH9.1 + AVGL9.1) / 2 AND H > H1 AND H1 > H2 AND L > L1 AND L1 > L2 AND C > (H + L) / 2 AND C1 > (H1 + L2) / 2 AND C2 > (H2 + L2) / 2 AND C > (MAXH3 + MINL3) / 2 AND (AVGH45 + AVGL45) / 2 > (AVGH45.1 + AVGL45.1) / 2 AND C > (AVGH45 + AVGL45) / 2

Bruce.
Re above code. I got a perfect result using your code. My code is above. I still do not see the difference. Using the code above  please show me the "extra spaces" and "line breaks:.
Will you do that for me so that I willl understand. For illustration purpose only, can you put the special character * after extra spaces and the special character + after each line break.
I will appreciate this as I do not trust myself anymore.
Thanks
george


Registered User Joined: 12/31/2005 Posts: 2,498

QUOTE (Bruce_L)
Look at the format of your formula as given in your post.
Look at the format of your formula as given in my post.
They are different. Your version has both line breaks between the formula components and extra spaces that mine does not.
When I copy and paste your version of the formula it doesn't work.
When I copy and paste my version of the formula it does work.
Sad state of a parser that can't deal appropriately with whitespace!
This ia a parser bug! Avoidable yes, but still a bug.
Don't expect it to be fixed.
The PCF language is an ancient and primitive scripting language that deserves to be replaced with the cababilites provided by StockFinder's realcode.
PCF shortcommings...
No If then else
No commenting capability
No local variables
No parameter passing
No function calls
One can hope for realcode


Platinum Customer
Joined: 10/7/2004 Posts: 425

QUOTE (jas0501)
Sad state of a parser that can't deal appropriately with whitespace!
This ia a parser bug! Avoidable yes, but still a bug.
Don't expect it to be fixed.
The PCF language is an ancient and primitive scripting language that deserves to be replaced with the cababilites provided by StockFinder's realcode.
PCF shortcommings...
No If then else
No commenting capability
No local variables
No parameter passing
No function calls
One can hope for realcode
Maybe so but TC has never been known to be a programmers paradise. Where it shines is in scans and sorts and with great speed. Almost any system has its idiosyncrasies in some form or fashion. Contrary to popular belief, fancy code does not make a trader more successful. Most successful traders use few if any indicators. Instead of hoping for realcode you should learn how to read price action.Use the strength of TC for narrowing down a list to a more manageable size and use the old eyeball method for your entries and exits.
A good book to learn price action would be Reading Price Charts Bar By Bar written by Al Brooks.


Registered User Joined: 5/11/2009 Posts: 120

Excellent post Booker. I have that book and studied it religiously. Trading price action has improved my trading tremendously.


Worden Trainer
Joined: 10/7/2004 Posts: 51,580

georgecdemas,
Nothing is obviously wrong about the formula in your Thursday, May 03, 2012 6:53:19 PM ET post. It doesn't have any glaring syntax issues, extra spaces or lines. It also seems to test correctly and nothing has jumped out at me about the symbols returning true or false which would seem to be incorrect.
This formula is not the same formula which was posted in your original Wednesday, May 02, 2012 7:27:08 PM ET post however. I have replaced the extra spaces in the formula from that post with * and placed a + at each extra line break:
************(AVGH5.1 + AVGL5.1) / 2 > (AVGH5.2 + AVGL5.2) / 2+
+
AND (AVGH9.1 + AVGL9.1) / 2 > (AVGH9.2 + AVGL9.2) / 2+
+
+
+
AND H1 > H2+
+
AND H2 > H3+
+
+
+
AND L1 > L2+
+
AND L2 > L3+
+
+
+
AND C1 > (H2 + L2) / 2+
+
AND C2 > (H3 + L3) / 2+
+
AND C3 > (H4 + L4) / 2+
+
+
+
AND C1 > (MAXH3.1 + MINL3.1) / 2+
+
+
+
AND (AVGH45.1 + AVGL45.1) / 2 > (AVGH45.2 + AVGL45.2) / 2+
+
+
+
AND C*1> (AVGH45.1 + AVGL45.1) / 2+
+
+
+
AND L < L1
Bruce


Registered User Joined: 3/24/2005 Posts: 72

Thank you Bruce for your reply.
I think there is nothing else that can be said. However, I want to correct something that escalated as we went along. It has to do with the "original formula" which was posted. NOTE: That was an edited formula put together in an attempt to simplify the viewing of the code.
This was the original formula:
(AVGH5.1 + AVGL5.1) / 2 > (AVGH5.2 + AVGL5.2) / 2 AND (AVGH9.1 + AVGL9.1) / 2 > (AVGH9.2 + AVGL9.2) / 2 AND H1 > H2 AND H2 > H3 AND L1 > L2 AND L2 > L3 AND C1 > (H2 + L2) / 2 AND C2 > (H3 + L3) / 2 AND C3 > (H4 + L4) / 2 AND C1 > (MAXH3.1 + MINL3.1) / 2 AND (AVGH45.1 + AVGL45.1) / 2 > (AVGH45.2 + AVGL45.2) / 2 AND C 1 > (AVGH45.1 + AVGL45.1) / 2 AND L < L1
I wanted you to see this  as I feel I have misguided you.
P.S. I am still in the dark.
Thanks for your help!


Worden Trainer
Joined: 10/7/2004 Posts: 51,580

There is one extra space in that formula that I can see:
(AVGH5.1 + AVGL5.1) / 2 > (AVGH5.2 + AVGL5.2) / 2 AND (AVGH9.1 + AVGL9.1) / 2 > (AVGH9.2 + AVGL9.2) / 2 AND H1 > H2 AND H2 > H3 AND L1 > L2 AND L2 > L3 AND C1 > (H2 + L2) / 2 AND C2 > (H3 + L3) / 2 AND C3 > (H4 + L4) / 2 AND C1 > (MAXH3.1 + MINL3.1) / 2 AND (AVGH45.1 + AVGL45.1) / 2 > (AVGH45.2 + AVGL45.2) / 2 AND C*1 > (AVGH45.1 + AVGL45.1) / 2 AND L < L1
Bruce


Registered User Joined: 3/24/2005 Posts: 72

Thank you Bruce,
I believe that could be the problem.
I am highly appreciative of your effort.
George


Worden Trainer
Joined: 10/7/2004 Posts: 51,580

You're welcome.
Bruce


Guest1 