PureBytes Links
Trading Reference Links
|
Hello Pacific,
This seems to provide you with the current year to date Percentage Gain
or Loss.Load into AA, n last quotations and n=1, click explore.
Newyear = Year();
startValue=ValueWhen(Year()<Ref(Year(),1) ,Close,1);
endValue = ValueWhen( Newyear, Close, 1);
Filter = Newyear;
AddColumn(Year(), "year", 1.0 );
AddColumn(100*( EndValue - StartValue )/StartValue, "Percentage change"
);AddColumn(startvalue,"start");AddColumn(endvalue,"end");
Anthony
pacific5_au wrote:
> Thanks TJ,
>
> Is it possible to also show the current year-to-date percentage
> returns in the same exploration as well ?
>
> Thank you and regards.
>
>
> pacific
>
>
>
> -----------------------------------------------------------
> --- In amibroker@xxxx, "Tomasz Janeczko" <tj@xxxx> wrote:
> > Hello,
> >
> > Here comes the code that calculates yearly percentage returns year
> by year and lists them in the exploration
> > window:
> >
> > NewYear = Year() != Ref( Year(), 1 );
> >
> > StartValue = ValueWhen( NewYear, Close, 2 );
> > EndValue = ValueWhen( NewYear, Close, 1 );
> >
> > Filter = NewYear;
> > AddColumn(Year(), "Year", 1.0 );
> > AddColumn(100*( EndValue - StartValue )/StartValue, "Percentage
> change" );
> >
> > Best regards,
> > Tomasz Janeczko
> > amibroker.com
> > ----- Original Message -----
> > From: "Anthony Faragasso" <ajf1111@xxxx>
> > To: <amibroker@xxxx>
> > Sent: Tuesday, July 16, 2002 3:06 PM
> > Subject: [amibroker] Rate of Change
> >
> >
> > > Hello,
> > >
> > > How would I find the monthly or yearly percentage gains for a
> > > particular year , say for the Dow jones.
> > >
> > > example:
>
> > >
> > > Thank you in advance
> > > Anthony
>
>
>
> Yahoo! Groups Sponsor
ADVERTISEMENT
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|