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 |

Replies to "Handy PCF example formulas to help you learn the syntax of PCFs!" Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
kbweb
Posted : Tuesday, March 15, 2005 12:12:56 PM
Registered User
Joined: 3/6/2005
Posts: 2
Hi,

Do you have the formulas for candlestick patterns, such as Morning Stars, Evening Stars, Bullish Engulfments, Bearish Engulfments, etc?
Craig_S
Posted : Tuesday, March 15, 2005 12:21:41 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Check out these videos...

Use PCFs and EasyScan to find Bullish Engulfing Candlesticks

Scanning for Dojis followed by gaps with Candlestick PCFs

Scanning for Hammers with Candlestick PCFs

Scanning for "Spinning Top" Candlesticks

- Craig
Here to Help!
Goldengate
Posted : Thursday, March 24, 2005 6:51:55 AM
Registered User
Joined: 2/2/2005
Posts: 9
I cannot seem to find the drop down boxes fo the Dojis followed by gaps with Candlestick PCFs? When I get to the personal criteria formula section there is nothing for an open or close price. Is this something just for TCNet?
Craig_S
Posted : Thursday, March 24, 2005 7:13:34 AM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Nope. You need to create these PCFs. Each of the candle videos have the PCFs you need to create under them. Scroll below the video and you should see them. Go to your TeleChart and click on NEW|New Personal Criteria Formula and create them.

- Craig
Here to Help!
Goldengate
Posted : Thursday, March 24, 2005 9:59:51 PM
Registered User
Joined: 2/2/2005
Posts: 9
I finally understand how to create PCF's and they are working GREAT. By the way, your videos are so e-a-s-y to understand and, being new to this, I really appreciate it. Keep up the great work!
Craig_S
Posted : Thursday, March 24, 2005 11:50:59 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
*kicks dirt*
Shucks, thanks!



- Craig
Here to Help!
eladstav
Posted : Saturday, March 26, 2005 10:52:56 AM
Registered User
Joined: 1/3/2005
Posts: 9
Hi,
I wrote this pcf to sort stocks rated overbought. It tested ok but I am getting stocks sorting "true" that do not fit the critieria (bellow 70 or declining RSI). Can you please advise what is wrong. Thanks.
RSI14.1 >= RSI14.1.1 AND RSI14.1.1 >= RSI14.1.2 AND RSI14.1 >= 70
steve456
Posted : Saturday, March 26, 2005 11:30:26 PM
Registered User
Joined: 3/15/2005
Posts: 1
I'd like to show another way of calculating a "price change" that may be easier to visualize as a percentage increase or decrease as follows: ((C/C10)-1)*100 for a percentage change in price between a current price and the closing price 10 days ago. Example: ((56/50)-1)*100=12%. That is todays price is 12% higher than the price 10 days ago. Check: 50*1.12=56.
or 56/50=1.12 then subtract 1 =.12, then multiply by 100 =12. This is especialy helpful in long formulas. This can be used for any time frame or volume, MAX,MIN,LOW,HIGH,CLOSE.
Craig_S
Posted : Sunday, March 27, 2005 11:56:57 AM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Are you using a simple RSI of 14 and 1 on the chart?

- Craig
Here to Help!
eladstav
Posted : Sunday, March 27, 2005 12:59:14 PM
Registered User
Joined: 1/3/2005
Posts: 9
correct.
eladstav
Posted : Sunday, March 27, 2005 1:06:55 PM
Registered User
Joined: 1/3/2005
Posts: 9
Actualy I think I found out what it is. The stocks match if I take off Wilders smoothing, meaning my formula does not take that into considaration. Is it possible to reconfigure so that it will? Thanks.
Craig_S
Posted : Tuesday, March 29, 2005 9:11:42 AM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Here is a thread you should look over:

Modeling "Pure" Wilder's RSI in PCF's

- Craig
Here to Help!
Ninahsu
Posted : Friday, April 1, 2005 12:59:38 AM
Registered User
Joined: 3/13/2005
Posts: 2
Do you know where can I find the formula of MACD,Bollinger Bands, Oscillator,C-rate,MF Slope,Momentum Index,etc?
Craig_S
Posted : Tuesday, April 5, 2005 8:44:24 AM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
If you do a search of the forums you will find several resources for PCF writing

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

- Craig
Here to Help!
dwatford
Posted : Monday, April 11, 2005 11:42:08 PM
Registered User
Joined: 1/31/2005
Posts: 1
You list them, but where can we find the details on each?
Craig_S
Posted : Tuesday, April 12, 2005 9:32:12 AM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
What type of details are you looking for? This is a list of PCF examples meant to help you learn/understand the syntax of the language.

If you have a specific question about one of the formulas or how the syntax works please swing by the Ask A Trainer forum and ask us about it.

- Craig
Here to Help!
wilson1
Posted : Saturday, June 4, 2005 4:00:52 PM
Registered User
Joined: 10/7/2004
Posts: 37
I'm trying to create a PCF that will add the price change of a stock over the past year to the dividend yield. I can't find dividend yield anywhere. How do I do that?
Craig_S
Posted : Sunday, June 5, 2005 12:15:38 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
You cannot include dividend yield or any fundamental criteria in a PCF. You can scan for certain price changes and certain dividend yields but cannot create a math function of both.

- Craig
Here to Help!
wilson1
Posted : Sunday, June 5, 2005 9:36:03 PM
Registered User
Joined: 10/7/2004
Posts: 37
If you said that I can scan for a dividend yield in a PCF, how do I do that? I don't see dividend yield in the list of functions?
Craig_S
Posted : Monday, June 6, 2005 2:20:50 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
It is a condition in EasyScan (not a PCF):

Using EasyScan to find stocks that meet your own criteria

Remember, PCFs create custom conditions, conditions are combined in EasyScan for scanning... PCFs do not "scan".

- Craig
Here to Help!
JENSEN
Posted : Monday, August 8, 2005 4:32:46 PM
Registered User
Joined: 3/10/2005
Posts: 1
HOW DO YOU ANNUALIZE %. PRESENT FORMUAL IS 100*(C-C'12/31/04')/C'12/31/04'
NOW I WANT TO ANNUALIZE IT BY FACTOR OF 365 (OR 250) DIVIDED BY DAYS FROM 12/31/04 TO PRESENT DATE.
Bruce_L
Posted : Wednesday, August 10, 2005 11:21:59 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
JENSEN,
I do not know of a simple way to automate your formula. I suspect the easiest thing to do is manually change your formula each day to reflect an accurate value for the number of days from 12/31/2004 to the present date). Maybe somebody else has a better idea.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
3COFFEE
Posted : Wednesday, August 17, 2005 6:35:43 PM
Registered User
Joined: 10/7/2004
Posts: 3
Any luck in coming up with a formula for the William's Accumulation/Distribution indicator. Once a PCF is set up for William's A/C, is it possible to scan for stocks that have the greatest divergence from the William's A/C indicator.

Bill
Craig_S
Posted : Wednesday, August 17, 2005 6:41:57 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
We answered your original request here:

To create a scan to find high TSV 18 and high William's A/D indicator

Check out this video. It will help you get the most out of these forums including finding specific posts:

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

To look for divergences, try this method:

Using Linear Regression Sorts to Help Spot Divergences

- Craig
Here to Help!
S2
Posted : Thursday, September 8, 2005 2:15:41 PM
Registered User
Joined: 4/6/2005
Posts: 239
Thanks for the overview list of Telechart functions. I am, however, still a bit confused. Many of the functions take parameters and some seem to have the parenthesis as being optionable.

Currently I am wanting to use H > MAXH(x.y) my specific questions:
1. are the parens required?
2. is x in the example the number of days scanned for the max high?
3. is y the number of days back the scan for the max highs begin?


While the provided samples are helpful what would be better would be a list of the functions, all the parameters for each function and a brief explanation of the parameter useage.

S2
Bruce_L
Posted : Thursday, September 8, 2005 2:21:00 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
S2,
A MAX function without parentheses or commas applies to Price (MAXCn, MAXOn, MAXHn, MAXLn). Using Max( ), you can find the maximum value of another function over a period of time. Note the use of the comma in the function. You cannot group operators within the brackets. For example, Max(AVGC10 – AVGC200,30) would not be a valid argument.

You may be interested in the following sections of the Online Help Files:

Personal Criteria Language Function List
Max( ) and Min( )

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
S2
Posted : Thursday, September 8, 2005 2:28:33 PM
Registered User
Joined: 4/6/2005
Posts: 239
Thanks Bruce,

That's where I stared before I found Craig's more detailed overview sample, neither place addresses using the parameters.

In the pcf I'm writing the H>MAXH (x.y) is not returning the result I would expect so I thought I would inquire if I am using this function correctly.

I am also assuming that with H,L,O,C and the min(), max(), and avg() fucntions the parameter lists and useage are the same.

S2
Craig_S
Posted : Thursday, September 8, 2005 2:41:26 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
H>MAXH(x,y) is not valid syntax

MAX(H,10) is highest high for 10 days

MAX(H1,12) if highest high for 12 days starting 1 day ago

With MAX and H you don't need parens.

MAXH4 = MAX(H,4)
MAXH5.10 = MAX(H10,5)

SO if X is the period to find the max within and y is the "days ago" parameter to start:

H>MAXHX.Y

is your syntax.

Does that help?

- Craig
Here to Help!
S2
Posted : Thursday, September 8, 2005 3:10:37 PM
Registered User
Joined: 4/6/2005
Posts: 239
Yes, that does help. Thanks

Using these everyday may make it second nature to you. For those of us still learning, there is some confusion. And, while the examples are helpful they do require interpretaion and extrapulation.

MAXH5.10 = MAX(H10,5) is not readily obvious or intuitive in fact it seems that they each look for something different. Not to mention knowing when to use the dot and when to use a comma, or parens.

A codex would make it simpler and easier. It would probably also reduce the number of these types of questions on your end and less frustration writing pcfs on our end.

S2
Craig_S
Posted : Thursday, September 8, 2005 4:01:51 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
When you want to MAX something that is not basic like C, H, V, O or L you need the paren/comma syntax. Otherwise the MAXC10 works.

Examples:

MAX(TSV18,10) is the highest TSV18 for the past 10 days

MAX(AVGC10,30) is the highest 10-day simple average of price for the past 30 days

MAXL6 is the highest low for the past 6 days.

- Craig
Here to Help!
financialbillionairemagician
Posted : Friday, November 4, 2005 11:43:45 AM
Gold Customer Gold Customer

Joined: 1/28/2005
Posts: 97
where can I find a list of PCF formulas for:

Morning star,
Morning doji star,
Evening star and
evening doji star .

Craig_S
Posted : Friday, November 4, 2005 12:02:05 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Follow this link:

Boolean PCFs for Candlestick Patterns

- Craig
Here to Help!
swingdude
Posted : Monday, November 21, 2005 3:13:11 PM
Registered User
Joined: 1/26/2005
Posts: 4
I would like to generate a PCF where the High is less than 20% of the difference C - O.???
Craig_S
Posted : Monday, November 21, 2005 3:16:28 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
I am not sure I understand.

You want stocks with a high less than the net difference between the open and the close?

I must be missing something, the high cannot be less than the open or the close, let alone less than the difference between the two.

Please elaborate more.

- Craig
Here to Help!
swingdude
Posted : Monday, November 21, 2005 3:20:15 PM
Registered User
Joined: 1/26/2005
Posts: 4
I should said I want the high less than 120% of the C-O. Sorry about that.
Craig_S
Posted : Monday, November 21, 2005 3:26:21 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Here is the PCF:

H<=(ABS(C-O)*1.2))

There are no stocks that fit this condition in the entire market (not a suprise).

The PCF finds stocks with a high less than or equal to 120% of the absolute difference between the close and the open.

I must still be missing something.

What do you mean by C-O?

- Craig
Here to Help!
Doug_H
Posted : Monday, November 21, 2005 3:31:19 PM


Worden Trainer

Joined: 10/1/2004
Posts: 4,308
Let's say a stock opens at $8 and closes at $10.

0=8 C=10 C-O = 10-8 which equals 2.

You said you want the high to be no more than 120% of that difference. in other words, the high could be no higher than $2.40 ($2*120%). But in this case the high is at least $10.

Obviously this doesn't make sense. Could you try to clarify again?

- Doug
Teaching Online!
chartist123
Posted : Thursday, December 8, 2005 7:09:27 PM
Registered User
Joined: 11/29/2005
Posts: 12
What is the formula to find if the high price on a certain day is higher than the high for 'x' days prior to that ? Can I then combine this with other criteria such as indicator value ( e.g. RSI between 70 and 80 ), price and volume to get a listing of stocks ?
Craig_S
Posted : Friday, December 9, 2005 8:00:32 AM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
You sure can.

Watch these videos for me:

How to create a Personal Criteria Forumula (PCF)

Using EasyScan to find stocks that meet your own criteria

Then try this PCF:

H>MAXH21.1

- Craig
Here to Help!
Nevania3
Posted : Friday, December 9, 2005 4:01:18 PM
Registered User
Joined: 7/28/2005
Posts: 8
Hi Craig
Not sure if i'm posting in the right place, but the question you answered below is very similar to a question i have so maybe you can clarify for me.
I am after a formula for the "close to be in the top 30% of its range for the day."
Can you help?


QUOTE (Craig_S)
Here is the PCF:

H&lt;=(ABS(C-O)*1.2))

There are no stocks that fit this condition in the entire market (not a suprise).

The PCF finds stocks with a high less than or equal to 120% of the absolute difference between the close and the open.

I must still be missing something.

What do you mean by C-O?
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.