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

Re: [EquisMetaStock Group] Rate of Return Indicator



PureBytes Links

Trading Reference Links

Hi Mark
 
 
Try the formula below.
X marks the last bar of each year except when on the last bar of data.
Y converts the N/A plotted by X on the last data bar to 0.
Z marks the last bar of each year or the last bar of data.
A returns the most recent end-of-year value.
B returns the previous end-of-year value.
The output line creates a percentage to two decimal places from A while eliminating potential divide-by-zero errors and skewed results should B initially return a spurious zero.
 
This code is essentially just 1 of the 22 display options available using the Trade Equity Display option. TE would be overkill for your situation but unless I'm missing something this extract should do the trick. Check the results anyway.
 
 {Annual % Rate Of Return}
X:=Year()<>Ref(Year(),+1);
Y:=ExtFml("Forum.Sum",X,1);
Z:=Y OR Cum(1)=LastValue(Cum(1));
A:=ValueWhen(1,Z,C);
B:=ValueWhen(2,Z,C);
PREC(100*(A-B)*(B<>0)/(Abs(B)+(B=0)),2);
 
 
Regards
 
Roy
 
 
----- Original Message -----
Sent: Monday, September 08, 2008 5:23 PM
Subject: [EquisMetaStock Group] Rate of Return Indicator

Hi,

Does anyone know where i can find an indicator that can plot the
Annual Rate of Return from one year to the next?

Any help would be much appreciated!

Mark



__________ NOD32 3424 (20080907) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com
__._,_.___

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

__,_._,___