Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 2/19/2006 Posts: 89
|
I just watched the video on how to do a PCF on Price Percent Change 45 days ago. I was intrested in creating a PCF which would show me Price Percent Change Year to date. I know the basic formula would be ((C-X)/X*100)where X is the price at the beginning of the year. My question is if anyone knows how to calculate X. (Do I include all days or just trading days?)If anyone has done a PCF for YTD and would like to share it I would greatly appreciate it.
Thank You
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
This should do it (and will have to be changed every year):
100*(C-C'12/30/05')/C'12/30/05'
Some might prefer 1/2/06. Either way, the idea is the same.
- Craig Here to Help!
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 4,308
|
The correct way is definitely using 12/30/05. Price Percent Change is typically calculated close to close. If you do use 1/2/06, you should probably use this PCF:
100*(C-O'1/2/06')/O'1/2/06'
- Doug Teaching Online!
|
|
Registered User Joined: 2/19/2006 Posts: 89
|
QUOTE (Craig_S) This should do it (and will have to be changed every year):
100*(C-C.12/30/05')/C.12/30/05'
Some might prefer 1/2/06. Either way, the idea is the same. When I highlite and copy and paste Craig's formula and formula test it using JNJ the formula test reads 100.00 * (57.47 - 57.47)/57.47 and returns a value of 0.
When I copy and paste Doug's formula and formula test it, the test reads 100.00 * (57.47 - 57.55)/57.55 and returns a value of -.14. When I do the custom date sort(C key on the chart) for Johnson & Johnson (Starting 12/30/2006 and ending 3/3/06) it gives a result of -4.38. I assume I am doing something wrong so if any of you have an idea please let me know.
Thank You
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
I corrected the PCFs, try them now.
- Craig Here to Help!
|
|
Registered User Joined: 2/19/2006 Posts: 89
|
QUOTE (Craig_S) I corrected the PCFs, try them now.
Craig, I tested the new formula with a couple of tickers and it worked like a charm. Thank You.
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
Glad it hear it!
- Craig Here to Help!
|
|
Gold Customer
Joined: 11/30/2004 Posts: 64
|
Craig,
When you corrected the PCFs, did you correct the original post of March 5, 2006? I have found this thread and created a year-to-date price change PCF by copying your post, but I am not sure its returning the right answers since your later post "corrected" it.
Bruce
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Craig's Sunday, March 05, 2006 10:19:39 PM ET post does appear to have the correct formula. That said, 2006 in now over.
Price Percent Change - 2006:
100 * C'12/29/06' / C'12/30/05' - 100
Price Percent Change YTD - 2007
100 * C / C'12/29/06' - 100
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!
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 3/26/2005 Posts: 2
|
Hi,
I'm interested in a PCF for the Maximum Price % Change for the last 500 bars. The PCF should return a positive percentage for a stock that has risen in price and a negative percentage for a stock that has fallen in price. Thanks, any assistance that you can provide would be much appreciated.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I'm actually not quite sure what is being asked. Depending on the specifics, it may or may not actually be possible to do in TC2000.
Do you want the highest and/or lowest 1-bar percent change over the most recent 500 bars?
Do you want the highest and/or lowest price percent change over any span of time within the most recent 500 bars?
Do you possibly want something else?
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |