Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 10/7/2004 Posts: 15
|
I would like to plug in a new scan for stocks with their 5 week moving average moving through their 13 week moving average. I have found this to be a pretty good signal either direction.
Would appreciate help with the code.
Thanks
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The following formulas all assume the moving averages are simple.
You can set the time frame of the Condition Formula in TC2000 version 12.3. This allows you to use the same formula you would use for a Daily version of this formula with the only difference being the Time Frame setting of the formula:
SGN(AVGC5 - AVGC13) <> SGN(AVGC5.1 - AVGC13.1)
All Personal Criteria Formulas in TC2000 version 7 are daily. This means we need to use manually expanded moving averages in the PCF created for this there:
SGN(8 * (C + C5 + C10 + C15 + C20) - 5 * (C25 + C30 + C35 + C40 + C45 + C50 + C55 + C60)) <> SGN(8 * (C5 + C10 + C15 + C20 + C25) - 5 * (C30 + C35 + C40 + C45 + C50 + C55 + C60 + C65))
PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 10/7/2004 Posts: 15
|
Thanks very much. Will give it a try.
|
|
Registered User Joined: 10/7/2004 Posts: 15
|
When I try to enter the formula into Telechart version 6 it does not calculate. Please advise on how I can get it to work.
Thanks
(Which set of numbers on the above PCF should I enter? - all or just the top line or just
the bottom line?)
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You need to use the entire formula:
SGN(8 * (C + C5 + C10 + C15 + C20) - 5 * (C25 + C30 + C35 + C40 + C45 + C50 + C55 + C60)) <> SGN(8 * (C5 + C10 + C15 + C20 + C25) - 5 * (C30 + C35 + C40 + C45 + C50 + C55 + C60 + C65))
The formula seems to calculate correctly in my copy of TC2000 version 7.
How to create a Personal Criteria Forumula (PCF)
Personal Criteria Formulas can be set to automatically update as part of the download by selecting Update and checking Update Personal Criteria following download. You can manually force your PCFs to update by selecting Databank | Personal Criteria Formulas | Update All Criteria.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 10/7/2004 Posts: 15
|
Thanks. It seems to work this time. Appreciate the help.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |