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 PCF Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
drewfalk
Posted : Saturday, April 7, 2012 3:57:09 PM
Registered User
Joined: 3/8/2012
Posts: 12

Hi again-  would you please show me how to write the formula for:  

The closing prices of today and the previous 3 days are each less than (the average of the last 12 days times 0.97)  AND

The closing prices of today and the last 3 days are increasing.

Thank you!  And BTW, are there any instructions or a tutorial for writing this language other than what's in Help under Custom Formula Language?

Bruce_L
Posted : Monday, April 9, 2012 9:58:48 AM


Worden Trainer

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

Please try the following:

.97 * AVGC12 > C AND C > C1 AND C1 > C2 AND C2 > C3

The PCF Formula Descriptions topic contains a fairly comprehensive list of the syntax which is valid in the Personal Criteria Formula Language and the Handy PCF example formulas to help you learn the syntax of PCFs! topic has some basic example PCFs.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
drewfalk
Posted : Sunday, April 29, 2012 7:42:21 PM
Registered User
Joined: 3/8/2012
Posts: 12

 

Hi Bruce- You had shown me the first several pieces of this formula.  I added a few more and they're not working.  Can you straighten me out, please?

.97 * AVGC12 > C AND C > C1 AND C1 < C2 and C2 < C3 AND O < C AND AVGV20 > 100000 AND AVGC60 > 5 AND C > AVGC200

What I want is:

  • Today closed 3% below AVGC12
  • Today was an up day, and the last 3 days were down days
  • Average volume was greater than 100,000
  • Average closing price for the last 60 days was more than $5
  • Today's close was above the 200-day moving average

I think the first 2 bulleted points are working, but the last 3 are not, or not always.  Thanks for your help!

StockGuy
Posted : Sunday, April 29, 2012 11:04:55 PM

Administration

Joined: 9/30/2004
Posts: 9,187

.97 * AVGC12 > C and C > C1 and C1 < C2 and C2 < C3 and C3 < C4 and AVGV20 > 100000 and AVGC60 > 5 and C > AVGC200

"Today was an Up Day": does this mean price closed above the previous day's close or that price closed above the open (which means the stock could still have been down compared to the previous day's close)?

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.