Subscription & data-feed pricing Class schedule

Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.

 Weekly EMA Rate this Topic:
 Previous Topic · Next Topic Watch this topic · Print this topic ·
Eternum
 Posted : Friday, February 9, 2007 9:09:48 PM
Registered User
Joined: 8/6/2005
Posts: 40
Hi guys,

How to write the following PCF: xavgc26.1 < xavgc26 for weekly data? Is this correct: xavgc130.5 < xavgc130?

Bruce_L
 Posted : Sunday, February 11, 2007 9:03:23 AM

Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Your formula is actually a pretty good one to use, but it will not match the charts because the charts are only based on every fifth close while your formula will use the closes in between as well for its calculations. If you want the results to match the charts, you may wish to try something like the following:

C > .0741468444601841 * (C5 + 25 / 27 * (C10 + 25 / 27 * (C15 + 25 / 27 * (C20 + 25 / 27 * (C25 + 25 / 27 * (C30 + 25 / 27 * (C35 + 25 / 27 * (C40 + 25 / 27 * (C45 + 25 / 27 * (C50 + 25 / 27 * (C55 + 25 / 27 * (C60 + 25 / 27 * (C65 + 25 / 27 * (C70 + 25 / 27 * (C75 + 25 / 27 * (C80 + 25 / 27 * (C85 + 25 / 27 * (C90 + 25 / 27 * (C95 + 25 / 27 * (C100 + 25 / 27 * (C105 + 25 / 27 * (C110 + 25 / 27 * (C115 + 25 / 27 * (C120 + 25 / 27 * (C125 + 25 / 27 * (C130 + 25 / 27 * (C135 + 25 / 27 * (C140 + 25 / 27 * (C145 + 25 / 27 * (C150 + 25 / 27 * (C155 + 25 / 27 * (C160 + 25 / 27 * (C165 + 25 / 27 * (C170 + 25 / 27 * (C175 + 25 / 27 * (C180 + 25 / 27 * (C185 + 25 / 27 * (C190 + 25 / 27 * (C195 + 25 / 27 * (C200 + 25 / 27 * (C205 + 25 / 27 * (C210 + 25 / 27 * (C215 + 25 / 27 * (C220 + 25 / 27 * (C225 + 25 / 27 * (C230 + 25 / 27 * (C235 + 25 / 27 * (C240 + 25 / 27 * (C245 + 25 / 27 * (C250 + 25 / 27 * (C255 + 25 / 27 * (C260 + 25 / 27 * (C265 + 25 / 27 * (C270 + 25 / 27 * (C275 + 25 / 27 * (C280 + 25 / 27 * (C285 + 25 / 27 * (C290 + 25 / 27 * (C295 + 25 / 27 * (C300 + 25 / 27 * (C305 + 25 / 27 * (C310 + 25 / 27 * (C315 + 25 / 27 * (C320 + 25 / 27 * (C325 + 25 / 27 * (C330 + 25 / 27 * (C335 + 25 / 27 * (C340 + 25 / 27 * (C345 + 25 / 27 * (C350 + 25 / 27 * (C355 + 25 / 27 * (C360 + 25 / 27 * (C365 + 25 / 27 * (C370 + 25 / 27 * (C375 + 25 / 27 * (C380 + 25 / 27 * (C385 + 25 / 27 * (C390 + 25 / 27 * (C395 + 25 / 27 * (C400 + 25 / 27 * (C405 + 25 / 27 * (C410 + 25 / 27 * (C415 + 25 / 27 * (C420 + 25 / 27 * (C425 + 25 / 27 * (C430 + 25 / 27 * (C435 + 25 / 27 * (C440 + 25 / 27 * (C445 + 25 / 27 * (C450))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

You may wish to review the following:

How to create a Personal Criteria Forumula (PCF)
Handy PCF example formulas to help you learn the syntax of PCFs!
PCF Formula Descriptions

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
cncrzy
 Posted : Saturday, October 27, 2007 8:45:13 AM
Registered User
Joined: 8/4/2006
Posts: 2

Hello, I've been a telechart user for about two years and I've searched the discussions for weekly PCFs but can't seem to follow the syntax. I've tried to write my own scan for this but still get stocks in the scan that are and have been falling like a rock. I have found this PCF for a rising 26 Week EMA:
C > .0741468444601841 * (C5 + 25 / 27 * (C10 + 25 / 27 * (C15 + 25 / 27 * (C20 + 25 / 27 * (C25 + 25 / 27 * (C30 + 25 / 27 * (C35 + 25 / 27 * (C40 + 25 / 27 * (C45 + 25 / 27 * (C50 + 25 / 27 * (C55 + 25 / 27 * (C60 + 25 / 27 * (C65 + 25 / 27 * (C70 + 25 / 27 * (C75 + 25 / 27 * (C80 + 25 / 27 * (C85 + 25 / 27 * (C90 + 25 / 27 * (C95 + 25 / 27 * (C100 + 25 / 27 * (C105 + 25 / 27 * (C110 + 25 / 27 * (C115 + 25 / 27 * (C120 + 25 / 27 * (C125 + 25 / 27 * (C130 + 25 / 27 * (C135 + 25 / 27 * (C140 + 25 / 27 * (C145 + 25 / 27 * (C150 + 25 / 27 * (C155 + 25 / 27 * (C160 + 25 / 27 * (C165 + 25 / 27 * (C170 + 25 / 27 * (C175 + 25 / 27 * (C180 + 25 / 27 * (C185 + 25 / 27 * (C190 + 25 / 27 * (C195 + 25 / 27 * (C200 + 25 / 27 * (C205 + 25 / 27 * (C210 + 25 / 27 * (C215 + 25 / 27 * (C220 + 25 / 27 * (C225 + 25 / 27 * (C230 + 25 / 27 * (C235 + 25 / 27 * (C240 + 25 / 27 * (C245 + 25 / 27 * (C250 + 25 / 27 * (C255 + 25 / 27 * (C260 + 25 / 27 * (C265 + 25 / 27 * (C270 + 25 / 27 * (C275 + 25 / 27 * (C280 + 25 / 27 * (C285 + 25 / 27 * (C290 + 25 / 27 * (C295 + 25 / 27 * (C300 + 25 / 27 * (C305 + 25 / 27 * (C310 + 25 / 27 * (C315 + 25 / 27 * (C320 + 25 / 27 * (C325 + 25 / 27 * (C330 + 25 / 27 * (C335 + 25 / 27 * (C340 + 25 / 27 * (C345 + 25 / 27 * (C350 + 25 / 27 * (C355 + 25 / 27 * (C360 + 25 / 27 * (C365 + 25 / 27 * (C370 + 25 / 27 * (C375 + 25 / 27 * (C380 + 25 / 27 * (C385 + 25 / 27 * (C390 + 25 / 27 * (C395 + 25 / 27 * (C400 + 25 / 27 * (C405 + 25 / 27 * (C410 + 25 / 27 * (C415 + 25 / 27 * (C420 + 25 / 27 * (C425 + 25 / 27 * (C430 + 25 / 27 * (C435 + 25 / 27 * (C440 + 25 / 27 * (C445 + 25 / 27 * (C450))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
How do I adjust this formula for a 13 EMA or a 52 Week EMA?
cncrzy

Bruce_L
 Posted : Saturday, October 27, 2007 9:50:41 AM

Worden Trainer

Joined: 10/7/2004
Posts: 65,138
cncrzy,
The key to adjusting the formula is reading and understanding the second topic referenced in my Sunday, February 11, 2007 9:03:23 AM post (Cascades of Moving Averages).

The 25 / 27 used through the formula is (Period - 1) / (Period + 1) = (26 - 1) / (26 + 1) = 25 / 27. The .0741468444601841 at the beginning of the series is 2 / 27 (which is 1 - 25 / 27) rounded up slightly to account for the fact that the formula used only has 90 terms instead of being an infinite series.

Converting the formula to 13-Weeks involves changing the 25 / 27 to a 12 / 14 = 6 / 7:

C > .142996048056393 * (C5 + 6 / 7 * (C10 + 6 / 7 * (C15 + 6 / 7 * (C20 + 6 / 7 * (C25 + 6 / 7 * (C30 + 6 / 7 * (C35 + 6 / 7 * (C40 + 6 / 7 * (C45 + 6 / 7 * (C50 + 6 / 7 * (C55 + 6 / 7 * (C60 + 6 / 7 * (C65 + 6 / 7 * (C70 + 6 / 7 * (C75 + 6 / 7 * (C80 + 6 / 7 * (C85 + 6 / 7 * (C90 + 6 / 7 * (C95 + 6 / 7 * (C100 + 6 / 7 * (C105 + 6 / 7 * (C110 + 6 / 7 * (C115 + 6 / 7 * (C120 + 6 / 7 * (C125 + 6 / 7 * (C130 + 6 / 7 * (C135 + 6 / 7 * (C140 + 6 / 7 * (C145 + 6 / 7 * (C150 + 6 / 7 * (C155 + 6 / 7 * (C160 + 6 / 7 * (C165 + 6 / 7 * (C170 + 6 / 7 * (C175 + 6 / 7 * (C180 + 6 / 7 * (C185 + 6 / 7 * (C190 + 6 / 7 * (C195 + 6 / 7 * (C200 + 6 / 7 * (C205 + 6 / 7 * (C210 + 6 / 7 * (C215 + 6 / 7 * (C220 + 6 / 7 * (C225)))))))))))))))))))))))))))))))))))))))))))))

Converting the formula to 52-Weeks involves changing the 25 / 27 to a 51 / 53:

C > .0377730159987874 * (C5 + 51 / 53 * (C10 + 51 / 53 * (C15 + 51 / 53 * (C20 + 51 / 53 * (C25 + 51 / 53 * (C30 + 51 / 53 * (C35 + 51 / 53 * (C40 + 51 / 53 * (C45 + 51 / 53 * (C50 + 51 / 53 * (C55 + 51 / 53 * (C60 + 51 / 53 * (C65 + 51 / 53 * (C70 + 51 / 53 * (C75 + 51 / 53 * (C80 + 51 / 53 * (C85 + 51 / 53 * (C90 + 51 / 53 * (C95 + 51 / 53 * (C100 + 51 / 53 * (C105 + 51 / 53 * (C110 + 51 / 53 * (C115 + 51 / 53 * (C120 + 51 / 53 * (C125 + 51 / 53 * (C130 + 51 / 53 * (C135 + 51 / 53 * (C140 + 51 / 53 * (C145 + 51 / 53 * (C150 + 51 / 53 * (C155 + 51 / 53 * (C160 + 51 / 53 * (C165 + 51 / 53 * (C170 + 51 / 53 * (C175 + 51 / 53 * (C180 + 51 / 53 * (C185 + 51 / 53 * (C190 + 51 / 53 * (C195 + 51 / 53 * (C200 + 51 / 53 * (C205 + 51 / 53 * (C210 + 51 / 53 * (C215 + 51 / 53 * (C220 + 51 / 53 * (C225 + 51 / 53 * (C230 + 51 / 53 * (C235 + 51 / 53 * (C240 + 51 / 53 * (C245 + 51 / 53 * (C250 + 51 / 53 * (C255 + 51 / 53 * (C260 + 51 / 53 * (C265 + 51 / 53 * (C270 + 51 / 53 * (C275 + 51 / 53 * (C280 + 51 / 53 * (C285 + 51 / 53 * (C290 + 51 / 53 * (C295 + 51 / 53 * (C300 + 51 / 53 * (C305 + 51 / 53 * (C310 + 51 / 53 * (C315 + 51 / 53 * (C320 + 51 / 53 * (C325 + 51 / 53 * (C330 + 51 / 53 * (C335 + 51 / 53 * (C340 + 51 / 53 * (C345 + 51 / 53 * (C350 + 51 / 53 * (C355 + 51 / 53 * (C360 + 51 / 53 * (C365 + 51 / 53 * (C370 + 51 / 53 * (C375 + 51 / 53 * (C380 + 51 / 53 * (C385 + 51 / 53 * (C390 + 51 / 53 * (C395 + 51 / 53 * (C400 + 51 / 53 * (C405 + 51 / 53 * (C410 + 51 / 53 * (C415 + 51 / 53 * (C420 + 51 / 53 * (C425 + 51 / 53 * (C430 + 51 / 53 * (C435 + 51 / 53 * (C440 + 51 / 53 * (C445 + 51 / 53 * (C450 + 51 / 53 * (C455 + 51 / 53 * (C460 + 51 / 53 * (C465 + 51 / 53 * (C470 + 51 / 53 * (C475 + 51 / 53 * (C480 + 51 / 53 * (C485 + 51 / 53 * (C490 + 51 / 53 * (C495 + 51 / 53 * (C500 + 51 / 53 * (C505 + 51 / 53 * (C510 + 51 / 53 * (C515 + 51 / 53 * (C520 + 51 / 53 * (C525 + 51 / 53 * (C530 + 51 / 53 * (C535 + 51 / 53 * (C540 + 51 / 53 * (C545 + 51 / 53 * (C550 + 51 / 53 * (C555 + 51 / 53 * (C560 + 51 / 53 * (C565 + 51 / 53 * (C570 + 51 / 53 * (C575 + 51 / 53 * (C580 + 51 / 53 * (C585 + 51 / 53 * (C590 + 51 / 53 * (C595 + 51 / 53 * (C600 + 51 / 53 * (C605 + 51 / 53 * (C610 + 51 / 53 * (C615 + 51 / 53 * (C620 + 51 / 53 * (C625 + 51 / 53 * (C630 + 51 / 53 * (C635 + 51 / 53 * (C640 + 51 / 53 * (C645 + 51 / 53 * (C650 + 51 / 53 * (C655 + 51 / 53 * (C660 + 51 / 53 * (C665 + 51 / 53 * (C670 + 51 / 53 * (C675 + 51 / 53 * (C680 + 51 / 53 * (C685 + 51 / 53 * (C690 + 51 / 53 * (C695 + 51 / 53 * (C700 + 51 / 53 * (C705 + 51 / 53 * (C710 + 51 / 53 * (C715 + 51 / 53 * (C720 + 51 / 53 * (C725 + 51 / 53 * (C730 + 51 / 53 * (C735 + 51 / 53 * (C740 + 51 / 53 * (C745 + 51 / 53 * (C750 + 51 / 53 * (C755 + 51 / 53 * (C760 + 51 / 53 * (C765 + 51 / 53 * (C770 + 51 / 53 * (C775 + 51 / 53 * (C780 + 51 / 53 * (C785 + 51 / 53 * (C790 + 51 / 53 * (C795 + 51 / 53 * (C800 + 51 / 53 * (C805 + 51 / 53 * (C810 + 51 / 53 * (C815 + 51 / 53 * (C820 + 51 / 53 * (C825 + 51 / 53 * (C830 + 51 / 53 * (C835 + 51 / 53 * (C840 + 51 / 53 * (C845 + 51 / 53 * (C850 + 51 / 53 * (C855 + 51 / 53 * (C860 + 51 / 53 * (C865 + 51 / 53 * (C870 + 51 / 53 * (C875 + 51 / 53 * (C880 + 51 / 53 * (C885 + 51 / 53 * (C890 + 51 / 53 * (C895 + 51 / 53 * (C900))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

These formulas only compare the current Week's EMA to the previous Week's EMA (well they actually compare the current Week's Price to the previous Week's EMA, but it amounts to the same thing). They do not check for the direction of the EMA prior to the previous Week.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
cncrzy
 Posted : Tuesday, October 30, 2007 5:42:47 AM
Registered User
Joined: 8/4/2006
Posts: 2
Thanks Bruce, one week is all I need. I've printed the other post and will work on improving my math skills.
Bruce_L
 Posted : Tuesday, October 30, 2007 8:32:58 AM

Worden Trainer

Joined: 10/7/2004
Posts: 65,138
cncrzy,
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.