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 |

PCF for Largest Drawdown in a Specific Time Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
cleven
Posted : Thursday, August 17, 2006 3:00:28 PM
Registered User
Joined: 12/7/2004
Posts: 331
Hello,

I want to write a pcf that shows the largest drawdown as a % between the days of 100 days ago and 40 days ago.

Said in a different way…I want to find the largest drawdown from the Opening Price 100 days ago (O100) to the Lowest Price 60 Days Thereafter (i.e. 40 Days Ago from Today, which is MinL40?)

And I would like to be able to show this value as:
1. A % of the Opening Price 100 Days ago, and as
2. A $ value from Opening Price 100 days ago.

‘Am not quite sure where to begin with this…hopefully I’ve asked the question in a way that begs some assistance.

Thanks for any help you can provide.

TC
Bruce_L
Posted : Thursday, August 17, 2006 3:47:27 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
QUOTE (cleven)
A % of the Opening Price 100 Days ago

If I'm understanding your request correctly, the following should work (the result is a Price Percent Change and should be negative unless the price was always above the Opening Price 100 days ago):

100 * O100 / MINL60.40 - 100

QUOTE (cleven)
A $ value from Opening Price 100 days ago.

If that works, the following will probably be correct as well (although you will have to reverse it if you want a negative value):

O100 - MINL60.40

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!
Personal Criteria Language Function List

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