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

Re: Rate of Change



PureBytes Links

Trading Reference Links

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