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 |

Fixing a Formula Value to a Fixed Date Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Francy
Posted : Wednesday, August 8, 2012 8:44:23 PM
Registered User
Joined: 8/8/2012
Posts: 5

I want to "normalize" the price history of a stock to it's latest closing price.

I thought I could do it with

C / C0

but the C0 was decremented, day by day, same as the C, so all you get for an indicator is 1.000 all the way back to the begining of time, when all I expect is today's indicator value to be unity.

I tried        C / [C0]       and    C / {C0}      and     C / "C0"      but recieved an error in every case.

Isn't ther some way to treat today's closing price, or any indicator value on any day as though it were a constant?   Something like an absolute address vs. a relative address in a spreadsheet?   

Bruce_L
Posted : Thursday, August 9, 2012 7:14:34 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

C and C0 are the same thing. The 0 is an assumed parameter when it is missing.

You can fix a bar in TC2000 version 12.2 by using an actual date for the bars ago parameter.

C / C'08/09/2012'

But you will need to change the formula each day if you want to fix it to the most recent date.

This is actually a new feature in TC2000 version 12.2. In TC2000 version 7 the date is converted to an integer bars ago parameter that does not change as the Custom Indicator is calculated instead of being fixed to whatever date is used.

PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Francy
Posted : Thursday, August 9, 2012 12:13:49 PM
Registered User
Joined: 8/8/2012
Posts: 5

Can I get around changing every formula every day by the use of a global environmental constant or variable that I only need to change once a day?

Bruce_L
Posted : Thursday, August 9, 2012 12:15:12 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

No, you can't. That's why I pointed out that you couldn't in my original response. If there had been a workaround I would have mentioned it.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Francy
Posted : Thursday, August 9, 2012 1:42:30 PM
Registered User
Joined: 8/8/2012
Posts: 5

Sorry.

So now I like the way

 (  C / C'08/09/12'  ) 

levels the field in the present,  but I would further like to normalize the normal fluctuations of the market out of the picture with secondary normalization by a similarly normalized market index, perhaps something along these lines which leads to an immediate formula error

 ( C / C'08/09/12' )   /  ( DJ-30 / DJ-30'08/09/12' ) 

 

Bruce_L
Posted : Thursday, August 9, 2012 1:47:43 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

I do not know of a practical automated method of writing Relative Strength PCFs in either verison of TC2000 as the Personal Criteria Formula Language does not have syntax for referencing other symbols. You may wish to review the following for a semi-automated technique for creating Relative Strength in a PCF:

Indexes in PCF's
RSMA PCFs



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