|
|
|
|
|||||||
| Coding Forum Collaborate, receive help, or discuss coding related issues. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||||
|
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.
__________________
Click here to donate to my 2008 Leukemia and Lymphoma Society donation page. Each year I do a fundraiser for my significant other's family as she lost her father to blood cancer. Please consider a donation, regardless of big or small and help this worthwhile cause. |
|
|||||
|
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! |
|
|||||
|
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.
__________________
Click here to donate to my 2008 Leukemia and Lymphoma Society donation page. Each year I do a fundraiser for my significant other's family as she lost her father to blood cancer. Please consider a donation, regardless of big or small and help this worthwhile cause. |
|
|||||||||||||||
|
Re: Rate of Annual Return
Thanks! ![]() |
|||||||||||||||
|
|||||||||||||||
|
Re: Rate of Annual Return
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.
__________________
Click here to donate to my 2008 Leukemia and Lymphoma Society donation page. Each year I do a fundraiser for my significant other's family as she lost her father to blood cancer. Please consider a donation, regardless of big or small and help this worthwhile cause. |
|||||||||||||||
|
|||||||||||||||
|
Re: Rate of Annual Return
As long as it can work I don't see a problem ... thanks! |
|||||||||||||||
|
|||||||||||||||
|
Re: Rate of Annual Return
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. |
|||||||||||||||
|
|||||||||||||||
|
Re: Rate of Annual Return
Cord = linearRegValue This uses another indicator? Linear Regression? Anyone has any suggestions what is the code of that indicator? Thank you! |
|||||||||||||||
|
|||||
|
Re: Rate of Annual Return
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?
__________________
Click here to donate to my 2008 Leukemia and Lymphoma Society donation page. Each year I do a fundraiser for my significant other's family as she lost her father to blood cancer. Please consider a donation, regardless of big or small and help this worthwhile cause. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 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 |
| Can function in TS8 return array? | ImXotep | Technical Analysis | 4 | 04-10-2007 05:22 PM |
| Interest Rate Parity | Nick1984 | Forex Laboratory | 5 | 03-14-2007 08:28 PM |
| Rate our website | Labcast | General Discussion | 5 | 09-12-2006 02:03 PM |
|
|
|