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

Reply
Old 07-31-2008, 08:05 PM   #9
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 john.potter »
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
Thanks for the code, I am on the task to code it for Metatrader4 but this part ...
Cord = linearRegValue

This uses another indicator? Linear Regression? Anyone has any suggestions what is the code of that indicator?

Thank you!
156 is offline  
Reply With Quote
Old 08-01-2008, 12:34 AM   #10

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 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!
As long as you are able to find the bullish markets, it may give you what you need. The question is - can you find the bullish markets?
brownsfan019 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 11:51 AM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.