Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Help with use of parentheses Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
volare714
Posted : Tuesday, February 18, 2014 10:22:54 AM
Registered User
Joined: 8/26/2011
Posts: 19


I'm trying to create a PCF for high volume and price going up at the same time, within the last 4 weeks.  I'm getting confused on the use of parentheses, as my scan is not catching some stocks it should be catching.  Can you tell me if the parentheses are correct?  I am looking for weekly volume that is at least 2.8 times greater than the previous week, with close this week being at least 5% higher than close of last week.  Here is what I've written:

(v>avgv50.1*2.8 and c>c1*1.05) or (v1>avgv50.2*2.8 and c1>c2*1.05) or (v2>avgv50.3*2.8 and c2>c3*1.05) or (v3>avgv50.4*2.8 and c3>c4*1.05) or (v4>avgv50.5*2.8 and c4>c5*1.05)

Thanks for your help!

 

Bruce_L
Posted : Tuesday, February 18, 2014 1:33:54 PM


Worden Trainer

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

Your Condition Formula is comparing the volume of the current bar to the average volume over the previous 50 bars instead of comparing the volume of the current bar to the volume of the previous bar. The Condition Formula also does not allow for equality and checks for the most recent 5 bars instead of the most recent 4 bars. Making this change would result in:

(V >= V1 * 2.8 AND C >= C1 * 1.05) OR (V1 >= V2 * 2.8 AND C1 >= C2 * 1.05) OR (V2 >= V3 * 2.8 AND C2 >= C3 * 1.05) OR (V3 >= V4 * 2.8 AND C3 >= C4 * 1.05)

Your use of parentheses is correct. It would force the ANDs in the formula to be calculated before the ORs in the formula.

Make sure you are setting the Time Frame drop-down of the Condition Formula to Weekly when creating or editing the Condition Formula.

Also note that if you make any changes to the Condition Formula and have used the Condition Formulas in your layout, you will need to delete the Condition Formula where it was used and re-add it in order to reflect the changes.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
volare714
Posted : Tuesday, February 18, 2014 3:16:04 PM
Registered User
Joined: 8/26/2011
Posts: 19

Thanks, Bruce!  I understand everything.  I didn't know that you have to delete and re-add to reflect the changes.

Is there anything besides the PCF examples and the webinars that would help me learn this language?  It is hard to understand "ranges", for example, - like if you want to ask for certain criteria "within" the past x number of days. This type of thing isn't covered much.

Ellen

Bruce_L
Posted : Tuesday, February 18, 2014 4:46:49 PM


Worden Trainer

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

Range isn't built into the syntax of the PCF Language but the MAXH and MINL indicators which can be used to calculate range are built into the PCF Language. So for example if you wanted to know the total range over the most recent 30 bars it would be:

MAXH30 - MINL30

As far as additional resources go, the forums as a whole are probably the best resource available. The trick is finding what you want. You need to use search terms which you think will be in somebody else's question about what interests you. You also need to decide if it is best to Match All Words (in cases where the words could be spread throughout the question) or Match Exact Phrase (in cases where the words might be common and having the words in the exact order might narrow things down).

Learn how to use the forums: post a new topic, reply, Search existing topics



-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.