Registered User Joined: 5/29/2011 Posts: 5
|
In Tuesday's introduction webinar, on the Sector Performance layout Michael had a column that should year to date change and change for pervious years. How do you write a PCF to do that? Can you now specify dates in a PCF instead of being limited to x number of days such as MAXH252.1?
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
A Personal Criteria Formula for the year to date percent change in 2011 could be written as:
100 * (C / C'12/31/2010' - 1)
It is possible to write Personal Criteria Formulas based on past dates (this is only for technicals). You may wist to review the following section of the Online Help Files:
Days Ago parameter
There are two distinct ways to use historical data with Personal Criteria Formulas.
Any criteria can be used to scan X number of days back by adding '.XX' where XX is equal to the number of market days past to calculate for. An example of this is (AVGC21.21), which is a 21 day moving average 21 of close, 21 days ago. This use of historical data always refers to the market day XX number of days ago (in this case, 21). If you wish to use a specific date’s data, use the option detailed below.
The other method of using historical data is by specifying a precise date in history to use. For example, (AVGC21.'11/13/08') will provide a 21 day moving average of close for November 13, 2008 (the period should be used in cases where the first method requires a period and not used when the first method does not use a period). Always confirm that the date you wish to use using this parameter was a market day.
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: 5/29/2011 Posts: 5
|
Thanks, Bruce
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|