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

RE: [amibroker] Monthly performance



PureBytes Links

Trading Reference Links

 

 

Hi Anthony,

 

seems to work great !

Thank you very much !

 

 

Regards

 

Klaus


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Anthony Faragasso
Sent: Thursday, February 02, 2006 11:59 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Monthly performance

 

SetForeign("~~~EQUITY");

TimeFrameSet(inMonthly);

Plot(TimeFrameExpand(ValueWhen(Month()!= Ref(Month(),-1),ROC(C,1)),inMonthly),"close",colorRed,styleLine);

RestorePriceArrays();

----- Original Message -----

Sent: Thursday, February 02, 2006 3:48 AM

Subject: RE: [amibroker] Monthly performance

 

Hello Terry,

 

i have also thought that but i have not found the solution.

Right now the code below displays on every first day of the month the difference to the last month.

Now i would like to fill the chart with this value as long as a new month begins. Any idea ?

 

 

 

eq = Foreign("~~~EQUITY", "C");

cash = Foreign("~~~EQUITY", "L");

dr = eq - Highest(eq);

bslh = HighestBars(eq);

CumMonth = Cum(Month() - Ref(Month(),-1)>0 OR Month() - Ref(Month(),-1)<0);

EQlastdayinmonth = ValueWhen(CumMonth>Ref(CumMonth,-1),EQ);

MP = EQlastdayinmonth - Ref(EQlastdayinmonth,-1);

//Plot(CumMonth,"CUM",1,styleLine);

GraphZOrder=1;

Plot(MP, "Portfolio Equity", colorLightBlue, styleArea );

//if( ParamToggle("Show Cash", "No|Yes", 0 ) ) Plot(cash, "Cash", colorGreen, styleArea );

//if( ParamToggle("Show Drawdown", "No|Yes", 1 ) ) Plot(dr, "Drawdown", colorDarkRed, styleArea );

//if( ParamToggle("Show #bars since last high", "No|Yes", 0 ) ) Plot(bslh, "#bars since last high", colorDarkYellow, styleLine | styleOwnScale, 0, 10 * LastValue( Highest( bslh ) )  );

islastbar = Status("lastbarintest");

isfirstbar = Status("firstbarintest");

bar = BarIndex();

firstbar = LastValue( ValueWhen( isfirstbar, bar ) );

lastbar = LastValue( ValueWhen( islastbar, bar ) );

al = LastValue( ValueWhen( islastbar, LinRegSlope( eq, Lastbar - firstbar + 1 ) ) );

bl = LastValue( ValueWhen( islastbar, LinRegIntercept( eq, Lastbar - firstbar + 1 ) ) );

Lr = al * ( BarIndex() - firstbar ) + bl;

Lr = IIf( bar >= firstbar AND bar <= lastbar , Lr, Null );

if( ParamToggle("Show lin. reg.", "No|Yes", 0 ) )Plot( Lr , "Linear Reg", colorRed, styleThick );

 

 

 

 

Regards

 

Klaus

 

 

 

-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Terry
Sent: Thursday, February 02, 2006 3:50 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] Monthly performance

 

Never tried it, but you should be able to save equity and use

TimeFrameSet(inMonthly) to convert to monthly, then plot.

--

Terry

 

-----Original Message-----

From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On

Behalf Of Klaus Korneker

Sent: Wednesday, February 01, 2006 15:26

To: amibroker@xxxxxxxxxxxxxxx

Subject: [amibroker] Monthly performance

 

Hello,

 

what's the easiest way to plot the monthly performance on a daily chart.

The default equity plots every bar a new value.

 

Regards

 

Klaus

 

 

 

 

 

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 other support material please check also:

http://www.amibroker.com/support.html

 

 

Yahoo! Groups Links

 

 

 

 

 

 

 

 

------------------------ Yahoo! Groups Sponsor --------------------~-->

Try Online Currency Trading with GFT. Free 50K Demo. Trade

24 Hours. Commission-Free.

http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM

--------------------------------------------------------------------~->

 

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 other support material please check also:

http://www.amibroker.com/support.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/

 

 

 



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 other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software Investment software


YAHOO! GROUPS LINKS