Welcome to the Traders Laboratory Forums.
Coding Forum Collaborate, receive help, or discuss coding related issues.

Reply
Old 07-28-2008, 09:14 PM   #1
156

156's Avatar

Join Date: Jul 2008
Location: Bulgaria
Posts: 36
Ignore this user

Thanks: 1
Thanked 0 Times in 0 Posts

Rate of Annual Return

Hello, I have been reading a book and I read about the Rate of Annual Return, unfortunately I couldn't find the indicator...it looks interesting.

Here is a quote from the book:

The ‘Rate of Annual Return’ Indicator
The ‘Rate of Annual Return’ (ROAR) indicator is used to calculate the annual rate of returnof a share given its current rate of climb or fall. It achieves this by calculating the annual increase in price activity and then dividing it by the current share price. The result is thenmultiplied by 100 to convert it to a percentage.
Example
• Lets assume that a share is climbing at a rate of $2 per year.
• The current price of the share is $5.
• The ‘Rate of Annual Return’ would be 0.4 ($2 divided by $5).
• Converting this to a percentage we get 0.4 x 100 = 40%.
156 is offline  
Reply With Quote
Old 07-28-2008, 11:23 PM   #2

brownsfan019's Avatar

Join Date: Jan 2007
Location: USA
Posts: 4,255
Ignore this user

Thanks: 1,912
Thanked 1,789 Times in 895 Posts

Re: Rate of Annual Return

Is it an actual indicator or just a math formula? If it's just a math formula that you plug #'s into, Excel will do the trick.
brownsfan019 is offline  
Reply With Quote
Old 07-29-2008, 06:39 AM   #3
156

156's Avatar

Join Date: Jul 2008
Location: Bulgaria
Posts: 36
Ignore this user

Thanks: 1
Thanked 0 Times in 0 Posts

Re: Rate of Annual Return

well it can be an indicator but I think a formula could work also, though you will constantly need to search for data to use a formula.. here is how the indicator should work ( I attach the screen shot) and also I searched on google and found some codes but I don't understand anything of coding .. here it is :

---------------------

// ROAR Version 1.0

Period=52;
X=Close;
LinReg=( Period * Sum( Cum( 1 ) * X,Period ) -
Sum( Cum( 1 ),Period) * Sum( X,Period) ) /
(Period * Sum(Cum( 1 )^2,Period ) -
Sum( Cum( 1 ),Period )^2 ) * Cum( 1 ) + (MA(X,Period) -
MA( Cum(1 ),Period) * (Period * Sum( Cum( 1 ) * X,Period) -
Sum( Cum( 1 ),Period ) * Sum( X,Period) ) / (Period *
Sum( Cum(1 )^2 ,Period) - Sum( Cum( 1 ),Period )^2 ) );

Graph1 = 200*(LinReg-Ref(LinReg,-26))/C;


// RAOR Version 2.0

TimeFrameSet(inWeekly);
RAOR = LinearReg((C-Ref(C,-26))/C*200,4);

Plot(raor,"RAOR",colorBla ck,0);


---------------------


and here is another one:


// ROAR

Enter = 30; // Make it whatever you want
Cutoff = 20;

roar = int(5200*(LinRegSlope(C, 26)/LinearReg(C,26)));
roar30 = int(LinearReg(roar, 5));

for (nCntr=0; nCntr<BarCount; nCntr++)
{
if (roar[nCntr] >= Enter AND roar30[nCntr] >= Enter)
roar[nCntr] = roar30[nCntr];
else if (roar[nCntr] <cutoff> 0)
roar[nCntr] = 0;
else if (roar[nCntr] <= -Enter AND roar30[nCntr] <= -Enter)
roar[nCntr] = roar30[nCntr];
else if (roar[nCntr] > -Cutoff AND roar[nCntr] < 0)
roar[nCntr] = 0;
}

Plot(roar, "ROAR", colorBlack, 1);
Plot(Cutoff, "Cutoff", colorRed, 1);
Plot(-Cutoff, "Cuttoff", colorRed, 1);


what do you think?

Thank you!
Attached Thumbnails
Rate of Annual Return-roar.jpg  
156 is offline  
Reply With Quote
Old 07-29-2008, 11:33 AM   #4

brownsfan019's Avatar

Join Date: Jan 2007
Location: USA
Posts: 4,255
Ignore this user

Thanks: 1,912
Thanked 1,789 Times in 895 Posts

Re: Rate of Annual Return

I think it could work very well in a bull market.

I'd love to see how it reacts in a bear / sideways market.
brownsfan019 is offline  
Reply With Quote
Old 07-29-2008, 12:38 PM   #5
156

156's Avatar

Join Date: Jul 2008
Location: Bulgaria
Posts: 36
Ignore this user

Thanks: 1
Thanked 0 Times in 0 Posts

Re: Rate of Annual Return

Quote:
Originally Posted by brownsfan019 »
I think it could work very well in a bull market.

I'd love to see how it reacts in a bear / sideways market.
I am pretty sure it is used only for long signals due to its specifics - if you look at the chart it is "activated" when a certain value is reached - otherwise it is just standing by. Does the code makes sense to anyone who is up to date with programming? I would really love to see how it performs,

Thanks!
156 is offline  
Reply With Quote
Old 07-29-2008, 12:44 PM   #6

brownsfan019's Avatar

Join Date: Jan 2007
Location: USA
Posts: 4,255
Ignore this user

Thanks: 1,912
Thanked 1,789 Times in 895 Posts

Re: Rate of Annual Return

Quote:
Originally Posted by 156 »
I am pretty sure it is used only for long signals due to its specifics - if you look at the chart it is "activated" when a certain value is reached - otherwise it is just standing by. Does the code makes sense to anyone who is up to date with programming? I would really love to see how it performs,

Thanks!
Exactly. Long only = bull market.

Therefore, if not in bull market but if this provides long signals, will have hard time making money.

So once a bull market is identified, then I would consider use of something like this.
brownsfan019 is offline  
Reply With Quote
Old 07-29-2008, 01:14 PM   #7
156

156's Avatar

Join Date: Jul 2008
Location: Bulgaria
Posts: 36
Ignore this user

Thanks: 1
Thanked 0 Times in 0 Posts

Re: Rate of Annual Return

Quote:
Originally Posted by brownsfan019 »
Exactly. Long only = bull market.

Therefore, if not in bull market but if this provides long signals, will have hard time making money.

So once a bull market is identified, then I would consider use of something like this.
I think it might be a useful tool if anyone can code it. There are so many markets, there will be at least one bullish to trade it As long as it can work I don't see a problem ... thanks!
156 is offline  
Reply With Quote
Old 07-31-2008, 08:16 AM   #8

Join Date: Jun 2008
Location: Darwin Australia
Posts: 11
Ignore this user

Thanks: 3
Thanked 6 Times in 2 Posts

Re: Rate of Annual Return

Quote:
Originally Posted by 156 »
I think it might be a useful tool if anyone can code it. There are so many markets, there will be at least one bullish to trade it As long as it can work I don't see a problem ... thanks!
Hi Guys
I think this may be what you want, it is Alan Hulls ROAR indicator from his book "Active investing"

'Rate of Return' lndicator
Variablec: ord(o),LD(o),Roar(0),cuto ff(o),Enter(0c)o, unter(52),P eriod(26);
For Counter = 52 downto 13 Begin
' "^ --;
I"""rRegValue(clos.,io.r. rt.r,0) > linearRegValue(close,Peri od,t0h)e n Period
= Counter;
End;
Cord = linearRegValue(close,Peri od,0);
iO = Co.a - Q.618 * Cord * AvgTiueRange(52)/Average(close,5)2
If LD < LD[l] then LD = LD[l];
If Cord < LD then LD = Cord;
ii i-."rn"gV"fue(close,26,0 )>O then Roar = IntPortion (5200 * linearRegslope(close,26)/
LinearRegValue(c1ose,26)e ,0ls)e R oar = 0;
iin";t t= 30 and IntPortion (LinearRegValue(roar,5,0) >)= 30 then Roar = IntPortion
(LinearRegValue(roar,5), )0;
Cutoff = 20;
Enter = 30;
if Roar < Cutoff then Roar = 0;
if Roar < Enter and Roar[l] = 0 then Roar = 0;
if Roarll] = 0 and summation(volume * MedianPrice'l3) < 120000 then Roar = 0 ;
iin.-ifj > 0 and summationivolume * MedianPrice,l3) < 100000 then Roar = 0 ;
if Cord = LD then Roar=O;
plotl (Roar,"Roar", darkgray,b lack' I );
plot2 (Cutoff, "Cutoff' , black , black , I );

This is supposed to work on tradestation, Which I don't have.

I do have a bull charts version but have not messed with it much

if you want to know more just google Alan Hull or alan hull.com.au

Last edited by john.potter; 07-31-2008 at 08:30 AM.
john.potter is offline  
Reply With Quote

Reply

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can function in TS8 return array? ImXotep Technical Analysis 5 05-25-2009 02:13 AM
Rate the chimp... walterw General Discussion 36 01-12-2008 11:31 PM
MarketProfile vs Return Destribution ImXotep Market Profile 2 11-28-2007 04:53 PM
Interest Rate Parity Nick1984 Forex Trading Laboratory 5 03-14-2007 08:28 PM
Rate our website Labcast General Discussion 5 09-12-2006 02:03 PM

All times are GMT -4. The time now is 09:43 AM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.