Registered User Joined: 10/7/2004 Posts: 11
|
please help???? trying to create pcf for :...........price closing one bar over 21sma on weekly chart, and another for.........price closing one bar over 21sma on daily chart. thanks in advance.........wayne.............p.s. is there a search area in here for finding things like these without bothering you guys? thanks
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The Learn how to use the forums: post a new topic, reply, Search existing topics topic covers searching the forums.
I'm not sure what "closing one bar over" means.
One way to write a Personal Criteria Formula for Price crossing up through its 21-Period Simple Moving Average on a Weekly Chart would be:
20 * C > C5 + C10 + C15 + C20 + C25 + C30 + C35 + C40 + C45 + C50 + C55 + C60 + C65 + C70 + C75 + C80 + C85 + C90 + C95 + C100 AND 20 * C5 <= C10 + C15 + C20 + C25 + C30 + C35 + C40 + C45 + C50 + C55 + C60 + C65 + C70 + C75 + C80 + C85 + C90 + C95 + C100 + C105
A formula for Price crossing down through its 21-Period Simple Moving Average on a Weekly Chart would be similar:
20 * C < C5 + C10 + C15 + C20 + C25 + C30 + C35 + C40 + C45 + C50 + C55 + C60 + C65 + C70 + C75 + C80 + C85 + C90 + C95 + C100 AND 20 * C5 >= C10 + C15 + C20 + C25 + C30 + C35 + C40 + C45 + C50 + C55 + C60 + C65 + C70 + C75 + C80 + C85 + C90 + C95 + C100 + C105
The following PCF would check for a crossover in either direction:
SGN(20 * C - C5 - C10 - C15 - C20 - C25 - C30 - C35 - C40 - C45 - C50 - C55 - C60 - C65 - C70 - C75 - C80 - C85 - C90 - C95 - C100) <> SGN(20 * C5 - C10 - C15 - C20 - C25 - C30 - C35 - C40 - C45 - C50 - C55 - C60 - C65 - C70 - C75 - C80 - C85 - C90 - C95 - C100 - C105)
You may wish to review the following:
How to create a Personal Criteria Forumula (PCF)
Moving Average PCF Templates
Things to check if your moving averages don't "seem right" or "seem to match"
PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!
-Bruce Personal Criteria Formulas TC2000 Support Articles
|