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 |

Moving Average PCF Templates Topic Rating:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Craig_S
Posted : Wednesday, August 30, 2006 1:41:02 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Below is a collection of indicator PCF templates to help you construct your own PCFs.

We will continue to add to this library. Anyone is welcome to add to these templates with their own PCF templates by posting a comment on this thread.

Pay close attention to your indicator settings.

Once you find the PCF template that fits you only need to insert your own indicator values.

Here is an example:

If you are looking for a 10 simple moving average to cross above a 20 simple moving average you would find this template:

Moving Averages Crossing: Up, Simple (short: 50 long: 100)
AVGC50>AVGC100 AND AVGC50.1<AVGC100.1

Your short is 10 your long is 20.

This is the PCF you would create by replacing your short and long
AVGC10>AVGC20 AND AVGC10.1<AVGC20.1

Enjoy!

Section One: Price and Moving Averages

Price above Moving Average: Simple (average: 10)
C>AVGC10

Price above Moving Average: Exponential (average: 10)
C>XAVGC10

Price below Moving Average: Simple (average: 10)
C<AVGC10

Price below Moving Average: Exponential (average: 10)
C<XAVGC10

Price crossing Moving Average: Up, Simple (average:10)
C>AVGC10 AND C1<AVGC10.1

Price crossing Moving Average: Up, Exponential (average:10)
C>XAVGC10 AND C1<XAVGC10.1

Price crossing Moving Average: Down, Simple (average:10)
C<AVGC10 AND C1>AVGC10.1

Price crossing Moving Average: Down, Exponential (average:10)
C<XAVGC10 AND C1>XAVGC10.1

Price crossing Moving Average: In last 5 days, Up, Simple (average:10)
C>AVGC10 AND (C1<AVGC10.1 OR C2<AVGC10.2 OR C3<AVGC10.3 OR C4<AVGC10.4 OR C5<AVGC10.5)

Price crossing Moving Average: In last 5 days, Up, Exponential (average:10)
C>XAVGC10 AND (C1<XAVGC10.1 OR C2<XAVGC10.2 OR C3<XAVGC10.3 OR C4<XAVGC10.4 OR C5<XAVGC10.5)

Price crossing Moving Average: In last 5 days, Down, Simple (average:10)
C<AVGC10 AND (C1>AVGC10.1 OR C2>AVGC10.2 OR C3>AVGC10.3 OR C4>AVGC10.4 OR C5>AVGC10.5)

Price crossing Moving Average: In last 5 days, Down, Exponential (average:10)
C<XAVGC10 AND (C1>XAVGC10.1 OR C2>XAVGC10.2 OR C3>XAVGC10.3 OR C4>XAVGC10.4 OR C5>XAVGC10.5)

Section Two: Two Moving Averages

Short above Long: Simple (short:5 long: 10)
AVGC5>AVGC10

Short above Long: Exponential (short:5 long: 10)
XAVGC5>XAVGC10

Short below Long: Simple (short:5 long: 10)
AVGC5<AVGC10

Short below Long: Exponential (short:5 long: 10)
XAVGC5<XAVGC10

Short crossing Long: Up, Simple (short:5 long: 10)
AVGC5>AVGC10 AND AVGC5.1<AVGC10.1

Short crossing Long: Up, Exponential (short:5 long: 10)
XAVGC5>XAVGC10 AND XAVGC5.1<XAVGC10.1

Short crossing Long: Down, Simple (short:5 long: 10)
AVGC5<AVGC10 AND AVGC5.1>AVGC10.1

Short crossing Long: Down, Exponential (short:5 long: 10)
XAVGC5<XAVGC10 AND XAVGC5.1>XAVGC10.1

Short crossing Long: In last 5 days, Up, Simple (short:5 long: 10)
AVGC5>AVGC10 AND (AVGC5.1<AVGC10.1 OR AVGC5.2<AVGC10.2 OR AVGC5.3<AVGC10.3 OR AVGC5.4<AVGC10.4 OR AVGC5.5<AVGC10.5)

Short crossing Long: In last 5 days, Up, Exponential (short:5 long: 10)
XAVGC5>XAVGC10 AND (X AVGC5.1<XAVGC10.1 OR X AVGC5.2<XAVGC10.2 OR XAVGC5.3<XAVGC10.3 OR XAVGC5.4<XAVGC10.4 OR X AVGC5.5<XAVGC10.5)

Short crossing Long: In last 5 days, Down, Simple (short:5 long: 10)
AVGC5<AVGC10 AND (AVGC5.1>AVGC10.1 OR AVGC5.2>AVGC10.2 OR AVGC5.3>AVGC10.3 OR AVGC5.4>AVGC10.4 OR AVGC5.5>AVGC10.5)

Short crossing Long: In last 5 days, Down, Exponential (short:5 long: 10)
XAVGC5<XAVGC10 AND (XAVGC5.1>XAVGC10.1 OR XAVGC5.2>XAVGC10.2 OR XAVGC5.3>XAVGC10.3 OR XAVGC5.4>XAVGC10.4 OR XAVGC5.5>XAVGC10.5)


- Craig
Here to Help!
scottnlena
Posted : Friday, March 02, 2007 1:38:42 AM

Registered User
Joined: 4/18/2005
Posts: 4,090
I want a pcf to screen for MGI's crossing Up through their 250 day ma. In this formula how do I change it from 5 days to thirty..or some large enough number to catch enough to make it worth while?

C > AVGC250 AND (C1 < AVGC250.1 OR C2 < AVGC250.2 OR C3 < AVGC250.3 OR C4 < AVGC250.4 OR C5 < AVGC250.5)
scottnlena
Posted : Friday, March 02, 2007 4:12:46 AM

Registered User
Joined: 4/18/2005
Posts: 4,090
also what does this pcf do? It is labled volume momentum. what is that and is this acurate? I have downloaded several pcfs at various times and then modified or tried to modify them for my purposes

(C > MAXH1.1) AND (V > 1 * V15)

Also I should have sail please on the above request. that is not a demand but a quisical request.
scottnlena
Posted : Friday, March 02, 2007 4:13:21 AM

Registered User
Joined: 4/18/2005
Posts: 4,090
said.. not sail
Craig_S
Posted : Friday, March 02, 2007 7:16:28 AM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
I don't understand what an MGI is in this statement:
QUOTE
MGI's crossing Up through their 250 day ma


The PCF you gave:
(C > MAXH1.1) AND (V > 1 * V15)

Is the same as this:
C>H1 AND V>V15

I don't know why it was written that way.



- Craig
Here to Help!
scottnlena
Posted : Friday, March 02, 2007 1:36:50 PM

Registered User
Joined: 4/18/2005
Posts: 4,090
MGI media general averages. Now Hemscott indexes or something like that. They are my end application in this case. the PCF obviously could be applied to anything in telechart.

C > AVGC250 AND (C1 < AVGC250.1 OR C2 < AVGC250.2 OR C3 < AVGC250.3 OR C4 < AVGC250.4 OR C5 < AVGC250.5)

the thing is I dont want to have to scan for ITEMS (hemscotts) crossing up through their Ma' every day. A criteria formula that returns todays results wont necessarily bring any thing that came through yesterday or last week etc. This formula was copy and pasted from above "Short crossing Long: In last 5 days, Up, Simple (short:5 long: 10" I jsut changed the Ma to the 250 day VS. the 10 day. Now I want to make it more than 5 days... I'm not shure how long... I guess I'll start with 15 days, but knowing what and how to change the formula lets me fiddle with it and not ask you for 500,000 PCFs. Pluss it's kinda fun but i'm still on training wheels. you'd never guess that I took and passed a statistical math class recently, but the information is fading now. I grasp the basic concepts but get myself lost in the logic.

thanks again.

Craig_S
Posted : Friday, March 02, 2007 2:33:37 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Here is your "crossed in the last 5-days version"

C > AVGC250 AND (C1 < AVGC250.1 OR C2 < AVGC250.2 OR C3 < AVGC250.3 OR C4 < AVGC250.4 OR C5 < AVGC250.5)

Here it is for last 6-days
C > AVGC250 AND
(C1 < AVGC250.1 OR
C2 < AVGC250.2 OR
C3 < AVGC250.3 OR
C4 < AVGC250.4 OR
C5 < AVGC250.5 OR
C5 < AVGC250.6)

Last 7
C > AVGC250 AND
(C1 < AVGC250.1 OR
C2 < AVGC250.2 OR
C3 < AVGC250.3 OR
C4 < AVGC250.4 OR
C5 < AVGC250.5 OR
C5 < AVGC250.6 OR
C5 < AVGC250.7)

See the pattern?

- Craig
Here to Help!
scottnlena
Posted : Wednesday, April 25, 2007 11:26:12 PM

Registered User
Joined: 4/18/2005
Posts: 4,090
Just to double check. price between the 20 and 50 exponential moving averages will be:

C<XAVGC 20 and C>XAVGC 50

?
scottnlena
Posted : Wednesday, April 25, 2007 11:45:50 PM

Registered User
Joined: 4/18/2005
Posts: 4,090
that woudl be in an up trend ,,,, in a down trend reverse the "<"s
Craig_S
Posted : Thursday, April 26, 2007 7:17:37 AM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
No space between the C and the 20 or 50 so....

C<XAVGC20 and C>XAVGC50



- Craig
Here to Help!
scottnlena
Posted : Thursday, April 26, 2007 11:39:50 AM

Registered User
Joined: 4/18/2005
Posts: 4,090
Thanks.
scottnlena
Posted : Monday, April 30, 2007 11:03:57 AM

Registered User
Joined: 4/18/2005
Posts: 4,090
I"ve played with this a bit and keep getting error in syntax messages. I'm looking to create PCF for 3 moving averages and their relationship to each other.

XAVG20>XAVG40 AND XAVGC>50
scottnlena
Posted : Monday, April 30, 2007 11:06:19 AM

Registered User
Joined: 4/18/2005
Posts: 4,090
THink i got it.:

XAVGC20>XAVGC40 AND XAVGC40>XAVGC50
Craig_S
Posted : Monday, April 30, 2007 11:06:46 AM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
What are you trying to do?

Your formula has several errors.

You are not indicating what should be averaged in the first part:

XAVG20

Do you want to average C, H, L, O or V?

The last part has no average value

XAVGC

What is the period of the average?



- Craig
Here to Help!
scottnlena
Posted : Monday, April 30, 2007 11:22:04 AM

Registered User
Joined: 4/18/2005
Posts: 4,090
So this shoudl give me the 20 above the 40 and the 40 above the 50...? Ive moved on from here and created an inverse for down trends (short term).
scottnlena
Posted : Monday, April 30, 2007 11:23:21 AM

Registered User
Joined: 4/18/2005
Posts: 4,090
by the way I sent a letter to you guys and a little something else to The NC address. I noticed later that there is also a florida address? but this isn't you guys rihgt?
Craig_S
Posted : Monday, April 30, 2007 11:50:45 AM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Bruce and I are based in NC. When did you send the letter?

- Craig
Here to Help!
scottnlena
Posted : Monday, April 30, 2007 2:45:04 PM

Registered User
Joined: 4/18/2005
Posts: 4,090
Late last week.. it's actually a box.
Craig_S
Posted : Monday, April 30, 2007 4:54:28 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
I will look out for it!

- Craig
Here to Help!
Bludog
Posted : Thursday, October 25, 2007 8:57:22 PM
Registered User
Joined: 11/8/2004
Posts: 89
Craig,

Regarding the PCFs you published under 'Moving Average PCF Templates,' 4/30/06, I have a template:

( AVGC10 > AVGC200 AND AVGC10.1 < AVGC200.1) OR (AVGC10.1 > AVGC200.1 AND AVGC10 < AVGC200)

which should show both those charts with the 10 SMA going up thru the 200 SMA and the 10 SMA going down through the 200 SMA in the past day. But it displays many charts wherein the 10 crossed more than 2 days back, some as far back as 10 days from the present.

Any ideas?

Thanks, as alawys,

/* Phil */
diceman
Posted : Friday, October 26, 2007 12:56:43 AM
Registered User
Joined: 1/28/2005
Posts: 6,049
Bludog

Make sure the averages are of the close.
(the ones on your chart)

Make sure you are on a daily timeframe.

Make sure you are at the end of the chart.
(mosr recent day)


Thanks
diceman
Craig_S
Posted : Friday, October 26, 2007 7:31:26 AM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Are your PCFs calculated to the most recent data?

Also, go through this checklist to see if it finds the problem: Things to check if your moving averages don't "seem right" or "seem to match"

- Craig
Here to Help!
Winnie
Posted : Friday, October 26, 2007 9:58:19 PM
Registered User
Joined: 10/7/2004
Posts: 1,006
I believe this is what you want:
 
The SMA10 going up thru the SMA200 Today and the SMA10 going down through the SMA200 Yesterday.
 
(AVGC10.0 > AVGC200.0 AND AVGC10.1 < AVGC200.1) OR (AVGC10.1 > AVGC200.1 AND AVGC10.2 < AVGC200.2)
 
Hope this helps
Winnie

bustermu
Posted : Friday, October 26, 2007 10:38:23 PM
Registered User
Joined: 1/1/2005
Posts: 2,645

Winnie,

You said:

"The SMA10 going up thru the SMA200 Today and the SMA10 going down through the SMA200 Yesterday."

The PCF says:

"The SMA10 going up thru the SMA200 Today or the SMA10 going up through the SMA200 Yesterday."

Thanks,
Jim Murphy

Winnie
Posted : Friday, October 26, 2007 11:58:38 PM
Registered User
Joined: 10/7/2004
Posts: 1,006

bustermu,

Thanks for catching my mistake, the corrected PCF should be: 

The SMA10 going up thru the SMA200 Today or the SMA10 going down through the SMA200 Yesterday.

(AVGC10.0 > AVGC200.0 AND AVGC10.1 < AVGC200.1) OR (AVGC10.1< AVGC200.1 AND AVGC10.2 > AVGC200.2)

Always can depend on you. 
 
All the very best
Winnie
dsellari
Posted : Friday, November 23, 2007 1:55:05 PM
Registered User
Joined: 12/17/2004
Posts: 2
Why is it my PCF of XAVG21>=AVGC14 test values don't seem to jive with the same plotted values?
Bruce_L
Posted : Saturday, November 24, 2007 10:16:53 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
dsellari,
You may wish to review the following:

Things to check if your moving averages don't "seem right" or "seem to match"

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
dsellari
Posted : Saturday, November 24, 2007 3:54:14 PM
Registered User
Joined: 12/17/2004
Posts: 2
Thanks, Bruce L. That had the answer.
mholman
Posted : Monday, September 29, 2008 2:52:52 PM
Registered User
Joined: 8/3/2006
Posts: 79
I would like to scan for stocks that have a weekly price cross up through its 10 week SMA.  When I write one for bars and run it I get daily crosses.  I can see what I want of the weekly chart but can't get it by going from daily chart to weekly.
Thanks  Mac
Bruce_L
Posted : Monday, September 29, 2008 3:03:36 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
mholman,
Personal Criteria Formulas are always based on the Daily twenty-minute delayed data. This means you need to construct your Weekly PCF using Daily Bars. One way to write the Daily PCF:

C > AVGC10 AND C1 <= AVGC10.1

As a Weekly PCF would be:

9 * C > C5 + C10 + C15 + C20 + C25 + C30 + C35 + C40 + C45 AND 9 * C5 <= C10 + C15 + C20 + C25 + C30 + C35 + C40 + C45 + C50

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
BigwaveDave
Posted : Friday, November 07, 2008 11:10:54 AM
Gold Customer Gold Customer

Joined: 11/24/2004
Posts: 3
I'm probably trying to reinvent the wheel but here goes... I am trying to scan for a 20 day EMA that crossed a 50 day day EMA  UP within the last 5 days and am getting an error. Can you help?

XAVGC20>XAVGC50 AND (X AVGC20.1<XAVGC50.1 OR X AVGC20.2<XAVGC50.2 OR XAVGC20.3<XAVGC50.3 OR XAVGC20.4<XAVGC50.4 OR X AVGC20.5<XAVGC50.5)
StockGuy
Posted : Friday, November 07, 2008 11:12:54 AM

Administration

Joined: 9/30/2004
Posts: 9,187
You've got an extra space between the X and A in XAVGC20.1.
BigwaveDave
Posted : Friday, November 07, 2008 12:02:43 PM
Gold Customer Gold Customer

Joined: 11/24/2004
Posts: 3
thanks! I need to edit in courier font!
umoo
Posted : Sunday, August 16, 2009 12:42:41 AM
Registered User
Joined: 1/9/2009
Posts: 1
This is a great resource!
jayjohnsonut
Posted : Sunday, September 13, 2009 6:30:55 PM
Registered User
Joined: 9/10/2009
Posts: 1
On the Moving Average template 

"Short crossing Long: In last 5 days, Up, Simple (short:5 long: 10)
AVGC5>AVGC10 AND (AVGC5.1<AVGC10.1 OR AVGC5.2<AVGC10.2 OR AVGC5.3<AVGC10.3 OR AVGC5.4<AVGC10.4 OR AVGC5.5<AVGC10.5)" 

I need to change in last five days to 2 days, but am unsure which 5 to change so that the mving average stays the same. thx
Bruce_L
Posted : Monday, September 14, 2009 8:28:29 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
jayjohnsonut,
Welcome to the forums. A very good foundation for learning how to use TeleChart can be gained by reviewing the following:

If you are new to TeleChart READ THIS FIRST!

Please try the following:

Short crossing Long: In last 2 days, Up, Simple (short:5 long: 10)

AVGC5>AVGC10 AND (AVGC5.1<AVGC10.1 OR AVGC5.2<AVGC10.2)

You may wish to review the following:

PCF Formula Descriptions
How to create a Personal Criteria Forumula (PCF)

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
osteon
Posted : Thursday, December 31, 2009 3:27:38 PM
Registered User
Joined: 1/30/2005
Posts: 46
I need a PCF for calculating a 20 day moving  average of volume.
Thanks,
Osteon
Bruce_L
Posted : Thursday, December 31, 2009 3:35:28 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
osteon,
Please try the following:

AVGV20

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
daraj123
Posted : Saturday, June 16, 2012 3:25:41 PM
Gold Customer Gold Customer

Joined: 12/11/2008
Posts: 11

Hi please correct me if i am wrong

 

AVGC5>AVGC10 AND (AVGC5.1<AVGC10.1 OR AVGC5.2<AVGC10.2)

 

Do i just paste this in like it is or do i have to edit it, a little confused from this

 

 

Thanks

Bruce_L
Posted : Monday, June 18, 2012 7:44:00 AM


Worden Trainer

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

Your formula would be for the 5-Period Simple Moving Average being above the 10-Period Simple Moving Average during the current bar but below during at least one of the previous two bars. I do not see anything you would need to change if this is your intent.

You should be able to copy and paste it from the forums into TC2000. In TC2000 version 12.2, you would need to use ctrl-v to paste the formula.



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