[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: Candle colour



PureBytes Links

Trading Reference Links

All:

 

I am trying to develop some analysis on how to determine if a signal or
a system is "breaking down".

 

While there are various methods for attempting to do this, my first
approach is to analyze "local" drawdown statistics and compare patterns.
One reference says that your system is in trouble is the Current
Drawdown = the Max Drawdown over previous periods.  Another reference
says it is in trouble if the current drawdown >= 1.25*MaxDD.

 

In any case, I would appreciate if someone can tell me if the following
is possible.  I want to wind up with an explore results grid that can be
exported.

 

The following simple code delivers current drawdown and you will see
that the last column is a "monthly drawdown stat", namely the maximum
current drawdown over the last 21 days.

 

Val = Foreign("HDGK","C");

 

CurEq = Val;

LogEq = log10(CurEq);

MaxEq = Highest(CurEq);

CurDD = 100 * (MaxEq - CurEq) / MaxEq;

Mdd   = HHV(CurDD,21);

MaxDD = Highest(CurDD);

CumDD    = Cum(CurDD);

 

Filter=1;

Buy=0;

 

AddColumn(Val,"Val",1.2);

AddColumn(CurDD,"Cdd",1.2);

AddColumn(MaxDD,"MaxDD",1.2);

AddColumn(Mdd,"MaxDD21days",1.2);

 

(I know attachments are turned off so I will try a paste in of a portion
of the result grid at the end of the message.)

 

(For those curious, the Val array comes from a price series that
represents an equity curve, although it is not produced within AB but
rather from the FastTrack program.)

 

If I run an explore on current stock and over a date range, I get one
line for every date.  The last column changes periodically as the
Maxdd21 changes. (see below if the paste comes thru).   Note that the
MaxDD is a single unchanging value for the entire date range.

 

My question: can I code this someway so that the rows in the result grid
are ONLY those dates representing the first day of the change in Mdd.  

 

I know each row of the results grid can be different stocks (if a
watchlist is used) or every date if a date range is used, but can it be
different dates with a single stock or fund?

 

I think the answer is "No", but I thought I would ask.

 

If "No", does anyone have a suggestion on how I can get a results grid
showing only those dates on which the Maxdd21 value changes?

 

Thanks for any help or suggestions.

 

Ken

 




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.735 / Virus Database: 489 - Release Date: 8/6/2004
 
  


[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/