Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Date selection for PCF Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
chartist123
Posted : Sunday, October 15, 2006 5:53:56 PM
Registered User
Joined: 11/29/2005
Posts: 12
Hello,
I have created a PCF for stocks for which the 20 day mvg avg price is greater than the 50 day moving avg price. I am trying to do the following.
1) I want a listing of stocks as per the above PCF for a given time period in the past (say for the month of March 2006)
2) I then want to see how this list fared at a later point in time (say June 2006).
Could you please advise on how to accomplish the above ?

Thanks.
Bruce_L
Posted : Sunday, October 15, 2006 9:54:22 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
TeleChart does not really have built in backtesting features, but you may wish to review the following:

Visually Backtesting Specific Symbols

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, (AVGC.21'12/31/97') will provide a 21 day moving average of close for December 31, 1997. In this particular case, December 31 is the last trading day of that specific year. This will not always be the case. Always confirm that the date you wish to use using this parameter was a market day.

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

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Winnie
Posted : Monday, October 16, 2006 1:47:26 AM
Registered User
Joined: 10/7/2004
Posts: 1,006
QUOTE (Bruce_L)

The other method of using historical data is by specifying a precise date in history to use. For example, (AVGC21཈/31/97') will provide a 21 day moving average of close for December 31, 1997. In this particular case, December 31 is the last trading day of that specific year. This will not always be the case. Always confirm that the date you wish to use using this parameter was a market day.

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


Bruce,

I believe the PCF needs a period after the AVGC21 and before the date, as AVGC21.'12/31/97'
Please correct me if I'm wrong.

This may help some users for date parameters, notes which I made from previous forums.

All Dates need a single quotation mark ‘5/3/06’ and can be used in combination with any PCF such as Price , Volume (V), SMA (AVGC), Average Volume (AVGV). Note the dot ( . ) location after a number. As far as the Days Ago Parameter, you can use number of days or calendar dates interchangeably.

For instance, if you want the SMA10 of price on December 31, 2005, AVGC10.'12/31/05' , you simply add a period ( . ) after the SMA10 and add the date notation.
If the expression does not need a period prior to the number of days ago ie. C21, then don't use a period before the date C'12/31/04'

C’8/15/06’ : Returns Close on 8/15/06
C’3/18/06' : Returns Close on 3/18/06
V’8/15/06’ : Returns Volume on 8/15/06
AVGC20.’8/15/06’ : Returns SMA20 on 8/15/06, a dot . after the AVGC20
AVGC10.'12/31/04' : Returns SMA10 on 12/31/04, a dot . after the AVGC10
AVGV90.’8/7/06’ : Returns AVGV90 on 8/7/06, a dot . after the AVGV90
AVGV30.’2/28/06’ : Returns AVGV30 on 2/28/06
C - C'06/30/06' / C'06/30/06' *100 : Returns Price % Change from 6/30/06 to Today
C - C'1/3/06' / C'1/3/06' *100 : Returns Price % Change from 1/3/06 to Today
C’6/1/06’ - C'1/3/06' / C'1/3/06' *100 : Returns Price % Change from 1/3/06 to 6/1/06
C’8/7/06'-C'7/31/06' / C'7/31/06' *100 : Returns Price % Change from 7/31/06 to 8/7/06
100*(C’6/1/06’) / (C’1/3/06’) -100 : Returns Price % Change from 1/3/06 to 6/1/06
100*(C’6/30/06’) / (C’12/30/05’) -100 : Returns Price % Change from 12/30/05 to 6/30/06
C'6/1/06' - C'1/3/06' : Returns Price Net Change from 1/3/06 to 6/1/06
C’3/31/06 - C'1/3/06' > 0 : Returns 1st Quarter 06 as positive
C'7/31/06' > AVGC20.'7/31/06' : Returns Price above SMA20 on 7/31/06

Thanks
Winnie
Winnie
Posted : Monday, October 16, 2006 2:11:40 AM
Registered User
Joined: 10/7/2004
Posts: 1,006
Bruce,

After another look at chartist123 question, could you write a PCF like this? I will use SMA20 and SMA50. Would this take forever to calculate?

AVGC20.'3/1/06' > AVGC50.'3/1/06' AND
AVGC20.'3/2/06' > AVGC50.'3/2/06' AND
AVGC20.'3/3/06' > AVGC50.'3/3/06' AND
AVGC20.'3/6/06' > AVGC50.'3/6/06' AND
………
AVGC20.'3/30/06' > AVGC50.'3/30/06' AND
AVGC20.'3/31/06' > AVGC50.'3/31/06' AND

Thanks
Winnie
Bruce_L
Posted : Monday, October 16, 2006 9:30:25 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
QUOTE (Winnie)
I believe the PCF needs a period after the AVGC21 and before the date, as AVGC21.཈/31/97'
Please correct me if I'm wrong.

You are correct (and this has been corrected above). If a period would be required for a Days Ago parameter (in this case, AVGC21.5 for example), a period is also required when using a date.

QUOTE (Winnie)
After another look at chartist123 question, could you write a PCF like this? I will use SMA20 and SMA50. Would this take forever to calculate?

Yes, you could write the Personal Criteria Formula this way. It calculates quite quickly on my computer.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
chartist123
Posted : Monday, October 16, 2006 11:58:57 PM
Registered User
Joined: 11/29/2005
Posts: 12
Hello Bruce and Winnie,
Thanks very much for your inputs. I will try using the formulas suggested by you.
Bruce_L
Posted : Tuesday, October 17, 2006 8:49:13 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
You're welcome. Our pleasure.

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

Forum Jump
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.