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

RE: [amibroker] Another Code Puzzle



PureBytes Links

Trading Reference Links

CurEq = Foreign("~~~Equity", "C", 1);

MaxEq = Highest(CurEq);

CurDD = IIf(CurEq < MaxEq, 100 * (MaxEq - CurEq) / MaxEq, 0);

MaxDD = Highest(CurDD);

 

MDDBar  = MaxDD == LastValue(MaxDD) AND CurDD == MaxDD AND CurDD != Ref(CurDD, -1);

CDD0Bar = Cum(0);

CDD0    = LastValue(Highest(IIf(MDDBar == 1, BarIndex() - BarsSince(CurDD == 0), 0)));

CDD0Bar[CDD0] = 1;

 

MDDDate  = LastValue(Highest(ValueWhen(MDDBar,  DateTime())));

CDD0Date = LastValue(Highest(ValueWhen(CDD0Bar, DateTime())));

 

Title = "MDD Beg - " + NumToStr(CDD0Date, formatDateTime) + "   " +

        "MDD End - " + NumToStr(MDDDate, formatDateTime) + "   " +

        "MDD% - " + NumToStr(LastValue(MaxDD), 1.2);

 

Plot(MaxDD,   "MaxDD",   colorRed);

Plot(CurDD,   "CurDD",   colorYellow);

Plot(MDDBar,  "MDDBar"colorWhite, styleHistogram | styleOwnScale | styleThick);

Plot(CDD0Bar, "CDD0Bar", colorBluestyleHistogram | styleOwnScale | styleThick);

 


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of tipequity
Sent: Friday, August 15, 2008 1:36 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Another Code Puzzle

 

(LOL), would you please show me how? Thanks

--- In amibroker@xxxxxxxxxps.com, Fred Tonetti <ftonetti@xx.> wrote:
>
> Yes there is .
>
>
>
> _____
>
> From: amibroker@xxxxxxxxxps.com [mailto:amibroker@xxxxxxxxxps.com]
On Behalf
> Of tipequity
> Sent: Friday, August 15, 2008 1:15 AM
> To: amibroker@xxxxxxxxxps.com
> Subject: Re: RE: [amibroker] Another Code Puzzle
>
>
>
> Fred
>
> Is there a way to include the starting and ending dates for max
> drawdown in the title? TIA
>
>
>
>
> _____
>
> I am using the free version of SPAMfighter for private users.
> It has removed 526 spam emails to date.
> Paying users do not have this message in their emails.
> Try SPAMfighter <http://www.spamfighter.com/len> for free now!
>



I am using the free version of SPAMfighter for private users.
It has removed 526 spam emails to date.
Paying users do not have this message in their emails.
Try SPAMfighter for free now!
__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___