## New version 18 available now

Subscription & data-feed pricing Class schedule

New account application Trading resources
Margin rates Stock & option commissions

 Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

 Weekly PCF's Rate this Topic:     Previous Topic · Next Topic Watch this topic · Print this topic ·
Kavika
 Posted : Tuesday, February 09, 2010 3:34:43 PM
Registered User
Joined: 10/7/2004
Posts: 17
I want to make a pcf for weekly ema's: 3>7>20, so is it simply a matter of multiplying by 5? xavgc15>xavgc35>xavgc100 ???
Bruce_L
 Posted : Tuesday, February 09, 2010 4:02:05 PM  Worden Trainer

Joined: 10/7/2004
Posts: 65,002
XAVGC15 > XAVGC35 AND XAVGC35 > XAVGC100 would not be a bad approximation, but the following should better match your Charts (as it samples the Price every 5-Days as would be done in actually calculating the Moving Averages):

.500488758553275 * (C + .5 * (C5 + .5 * (C10 + .5 * (C15 + .5 * (C20 + .5 * (C25 + .5 * (C30 + .5 * (C35 + .5 * (C40 + .5 * (C45)))))))))) > .250188277551581 * (C + .75 * (C5 + .75 * (C10 + .75 * (C15 + .75 * (C20 + .75 * (C25 + .75 * (C30 + .75 * (C35 + .75 * (C40 + .75 * (C45 + .75 * (C50 + .75 * (C55 + .75 * (C60 + .75 * (C65 + .75 * (C70 + .75 * (C75 + .75 * (C80 + .75 * (C85 + .75 * (C90 + .75 * (C95 + .75 * (C100 + .75 * (C105 + .75 * (C110 + .75 * (C115 + .75 * (C120))))))))))))))))))))))))) AND .250188277551581 * (C + .75 * (C5 + .75 * (C10 + .75 * (C15 + .75 * (C20 + .75 * (C25 + .75 * (C30 + .75 * (C35 + .75 * (C40 + .75 * (C45 + .75 * (C50 + .75 * (C55 + .75 * (C60 + .75 * (C65 + .75 * (C70 + .75 * (C75 + .75 * (C80 + .75 * (C85 + .75 * (C90 + .75 * (C95 + .75 * (C100 + .75 * (C105 + .75 * (C110 + .75 * (C115 + .75 * (C120))))))))))))))))))))))))) > .0953245136006837 * (C + 19 / 21 * (C5 + 19 / 21 * (C10 + 19 / 21 * (C15 + 19 / 21 * (C20 + 19 / 21 * (C25 + 19 / 21 * (C30 + 19 / 21 * (C35 + 19 / 21 * (C40 + 19 / 21 * (C45 + 19 / 21 * (C50 + 19 / 21 * (C55 + 19 / 21 * (C60 + 19 / 21 * (C65 + 19 / 21 * (C70 + 19 / 21 * (C75 + 19 / 21 * (C80 + 19 / 21 * (C85 + 19 / 21 * (C90 + 19 / 21 * (C95 + 19 / 21 * (C100 + 19 / 21 * (C105 + 19 / 21 * (C110 + 19 / 21 * (C115 + 19 / 21 * (C120 + 19 / 21 * (C125 + 19 / 21 * (C130 + 19 / 21 * (C135 + 19 / 21 * (C140 + 19 / 21 * (C145 + 19 / 21 * (C150 + 19 / 21 * (C155 + 19 / 21 * (C160 + 19 / 21 * (C165 + 19 / 21 * (C170 + 19 / 21 * (C175 + 19 / 21 * (C180 + 19 / 21 * (C185 + 19 / 21 * (C190 + 19 / 21 * (C195 + 19 / 21 * (C200 + 19 / 21 * (C205 + 19 / 21 * (C210 + 19 / 21 * (C215 + 19 / 21 * (C220 + 19 / 21 * (C225 + 19 / 21 * (C230 + 19 / 21 * (C235 + 19 / 21 * (C240 + 19 / 21 * (C245 + 19 / 21 * (C250 + 19 / 21 * (C255 + 19 / 21 * (C260 + 19 / 21 * (C265 + 19 / 21 * (C270 + 19 / 21 * (C275 + 19 / 21 * (C280 + 19 / 21 * (C285 + 19 / 21 * (C290 + 19 / 21 * (C295 + 19 / 21 * (C300 + 19 / 21 * (C305 + 19 / 21 * (C310 + 19 / 21 * (C315 + 19 / 21 * (C320 + 19 / 21 * (C325 + 19 / 21 * (C330 + 19 / 21 * (C335 + 19 / 21 * (C340 + 19 / 21 * (C345))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

You may wish to review the following:

Moving Average PCF Templates
Things to check if your moving averages don't "seem right" or "seem to match"
How to create a Personal Criteria Forumula (PCF)
PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!
Cascades of Moving Averages

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Quiktdr
 Posted : Thursday, March 01, 2018 6:55:11 PM Platinum Customer

Joined: 10/7/2004
Posts: 792

How to write a weekly calender PCF  Monday to Friday instead of C5 which is the close 5 days ago.

Thank you !

Bruce_L
 Posted : Friday, March 02, 2018 9:03:13 AM  Worden Trainer

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

You cannot create weekly charts or formulas based on calendar weeks instead of rolling 5 trading days per bar weeks in TC2000 v7.

The weekly charts and formulas in TC2000 v11/v12/v16/v17/v18b are based on calendar weeks as long as the time frame is set to weekly.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Quiktdr
 Posted : Friday, March 02, 2018 9:12:22 AM Platinum Customer

Joined: 10/7/2004
Posts: 792

OK thank you Bruce!

Quiktdr
 Posted : Monday, March 05, 2018 10:00:26 AM Platinum Customer

Joined: 10/7/2004
Posts: 792

Brain Freeze yet again!

What is difference between  C5.1   and C5,1   period vs comma

Also (O+H+L+C)/4  is mean price based on 4 variables  to change tp weekly is  (O5+H5+L5+C5)/4

or is that the price mean 5 days ago?

Thank you in advance!

Bruce_L
 Posted : Monday, March 05, 2018 10:41:19 AM  Worden Trainer

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

Neither `C5.1` no `C5,1` is valid syntax.

If you want want 5 bars ago use:

C5

If you want 6 bars ago use:

`C6`

`C5.1` won't get you 6 bars ago. You can't just keeping stackin on additional bars ago parameters.

`(O5 + H5 + L5 + C5) / 4`

Is for 5 bars ago. If you want the weekly version of (O + H + L + C) / 4 for TC2000 v7, please try the following instead.

`(O4 + MAXH5 + MINL5 + C) / 4`

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Quiktdr
 Posted : Wednesday, March 14, 2018 3:15:36 PM Platinum Customer

Joined: 10/7/2004
Posts: 792

This is weekly version (O4 + MAXH5 + MINL5 + C) / 4  if I want to weight the open

higher based on my assumption that it is twice as important  would this be formula

(O4*2 + MAXH5 + MINL5 + C) / 5 >AvgC3 ?

and how would I write a crossover form last week (O4,1*2 + MAXH5,1 + MINL5,1 + C,1) / 5 >AvgC3,1

(O4*2 + MAXH5 + MINL5 + C) / 5 >AvgC3 > (O4,1*2 + MAXH5,1 + MINL5,1 + C,1) / 5 >AvgC3,1

Thank you in advance!

Bruce_L
 Posted : Wednesday, March 14, 2018 3:31:34 PM  Worden Trainer

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

Yes, you would multiply the factor by two and add one to the denominator just like you did.

The formulas are daily formulas replicating the five trading day per bar weekly bars of TC2000 v7. So you need to add 5 to the bars ago parameters to get the prior week.

`(2 * O4 + MAXH5 + MINL5 + C) / 5`

Becomes:

`(2 * O9 + MAXH5.5 + MINL5.5 + C5) / 5`

And if you want a weekly 3 period simple moving average of the close, it would be the following.

`(C + C5 + C10) / 3`

Which one week ago would be:

`(C5 + C10 + C15) / 3`

So your double weighted open thing crossing up through the 3 period simple moving average of the close would be:

`(2 * O4 + MAXH5 + MINL5 + C) / 5 > (C + C5 + C10) / 3 AND (2 * O9 + MAXH5.5 + MINL5.5 + C5) / 5 <= (C5 + C10 + C15) / 3`

And your double weighted open thing being greater than the bar before with the bar before greater than the 3 period simple moving average would be:

`(2 * O4 + MAXH5 + MINL5 + C) / 5 > (2 * O9 + MAXH5.5 + MINL5.5 + C5) / 5 AND (2 * O9 + MAXH5.5 + MINL5.5 + C5) / 5 > (C5 + C10 + C15) / 3`

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Quiktdr
 Posted : Wednesday, March 14, 2018 3:45:32 PM Platinum Customer

Joined: 10/7/2004
Posts: 792

Thank you Bruce!!!

Bruce_L
 Posted : Wednesday, March 14, 2018 3:46:21 PM  Worden Trainer

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

You're welcome.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

 Forum Jump Customer Training & Support - Ask a Trainer - TC2000 version 12/18 - Ask a Trainer - TC2000 version 7 - Ask a Trainer - StockFinder 5.0 - PCFs, EasyScan and Custom Indicators General Discussions - Stock and Market Talk - TC2000 version 12 or 18 - TC2000 version 7 - StockFinder 5.0 - RealCode for StockFinder 5.0 Tutorial Videos - TC2000 version 12 tutorial videos - TC2000 version 7 tutorial videos 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.