Registered User Joined: 10/7/2004 Posts: 131
|
I use the following PCF for finding the price change over the last 5 days ending today
(C - C5) / C5 * 100
I am trying to write a PCF fo finding the price change over the last 5 days at yesterdays close, two days ago close, three days etc for backtesting
I wondered if this is the correct PCF for 5 day price change at yesterdays close.
(C1 - C5.1) / C5.1 * 100
Is this the correct PCF for 5 day price change at close 2 days ago
(C2- C5.2) / C5.2 * 100
Thanks very much
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You can't add a second bars ago parameter. You need to increment the existing bars ago parameters.
So a 1-bar ago version of:
(C - C5) / C5 * 100
Would be:
(C1 - C6) / C6 * 100
And a 2-bars ago version would be:
(C2 - C7) / C7 * 100
PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!
-Bruce Personal Criteria Formulas TC2000 Support Articles
|