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

Re: [amibroker] Rate of Change



PureBytes Links

Trading Reference Links

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@xxxxxxxxxxxxxxx>
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:
> 
> the year is 1953 //how would I find the percentage gains for the year
> or
> the month is January // how would I find the percentage gains for the
> month of January.
> 
> Thank you in advance
> Anthony
> 
> 
> 
> 
> 
> 
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
> 
> 
>