Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 10/18/2007 Posts: 2
|
I am trying to write a PCF for the maximum drawdown in percent of a stock price over some selected fixed past time period (say one year), but am unable to figure out how to do so. I would like to be able to sort the result on all stocks or industry group watch lists in rank order. Perhaps TC2000 already has a built in formula to do this but I have not found it. Thanks
|
|
Registered User Joined: 1/28/2005 Posts: 6,049
|
Click above your watchlist tabs.
Under system sorts. There is a condition:
Price as a percent of 52 week high.
Thanks
diceman
|
|
Registered User Joined: 10/18/2007 Posts: 2
|
Thanks, but this would only give me the current drawdown but not the maximum drawdown over the past year.
|
|
Registered User Joined: 12/21/2004 Posts: 902
|
Can you please be a little clearer on what you are looking for?
What do you mean by "maximum drawdown" - it's not an expression that I am familiar with. Is it the biggest % price loss during the entire period that you are considering? Is it the biggest one-bar loss during a longer time period? Is it the biggest loss against the starting point of the period or is it the biggest loss against whatever the highest point of the period was? Is it something else?
|
|
Registered User Joined: 1/28/2005 Posts: 6,049
|
You could use:
MAXH250
and
MINL250
in your calcuations.
This is the highest high and lowest low over the past year.
Thanks
diceman
|
|
Registered User Joined: 12/21/2004 Posts: 902
|
Yeah I did some research and found out what "maximum drawdown" is. Since it's based on flexible time periods, I'm not sure how it could be translated into a telechart PCF.
Diceman - I thought of your method, but how do you test to see if the MIN was after the MAX and not before - is there a date function test that one can use in a PCF?
|
|
Registered User Joined: 1/28/2005 Posts: 6,049
|
hohandy
From ajb1900's statements it appears that
type of accuracy is not required. I haven't thought
about it much but I would imagine different look back
lengths could be compared. (every 21 days?).
It could probably be set up to output 1 or 5 or
8 depending on how far back (in months) the
actual low was hit.
(it would only be an indicator of when the low was hit
and the actual calculation would be a separate issue)
--------------------------------------------------------------------------
I suspect what is desired is something along the lines of:
((MAXH250 - MINL250) / MAXH250) * 100
for the symbol: CC its value is 72.08. Indicating
it lost 72.08% of its peak value when it hit its
minimum low.
The lower the value the smaller the 250 day drawdown.
Thanks
diceman
|
|
Guest-1 |