| Coding Forum Collaborate, receive help, or discuss coding related issues. |
![]() | | Tweet | |
| | #1 | ||
![]() | Rate of Annual Return 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%. | ||
| |
|
| | #2 | ||
![]() | Re: Rate of Annual Return | ||
| |
|
| | #3 | ||
![]() | Re: Rate of Annual Return --------------------- // 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! | ||
| |
|
| | #4 | ||
![]() | Re: Rate of Annual Return I'd love to see how it reacts in a bear / sideways market. | ||
| |
|
| | #5 | ||
![]() | Re: Rate of Annual Return Quote:
Thanks! | ||
| |
|
| | #6 | ||
![]() | Re: Rate of Annual Return Quote:
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. | ||
| |
|
| | #7 | ||
![]() | Re: Rate of Annual Return Quote:
As long as it can work I don't see a problem ... thanks! | ||
| |
|
| | #8 | ||
![]() | Re: Rate of Annual Return Quote:
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. | ||
| |
|
![]() |
| Thread Tools | |
| Display Modes | 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 |