Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

5 day price change on previous day Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
celo
Posted : Tuesday, October 2, 2012 10:40:25 AM
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

 

Bruce_L
Posted : Tuesday, October 2, 2012 10:43:47 AM


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