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

Re: ROC indicators



PureBytes Links

Trading Reference Links

To All,

Because I think some of the ROC formulas did not make it to the group I am
resending what I have concerning the formulas:

>Dear Randy from Petersburg,
>None of the formulas were posted to the group. I would also like to
>begin testing some of these with other indicators, i.e. only taking
>longs when trend is up/shorts when down, etc.  I ordered the book today
>and should have it Wednesday.  Would appreciate any code/system you
>received that I may begin working on.
>Thanks,
>Randy from Tampa
>(Barlow)

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

ROC is the percent change over time:
ROC = ((C/C[N])-1)*100         Answer in percentage.   
N = period of time you're comparing.

Best Regards,

Jerry Rehert
Atlanta, GA
@ 11:32 pm ,March 4th, 1998

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

From: Peter Gibson <Peter_Gibson@xxxxxxxxxxxxxx>
To: 75231.2457@xxxxxxxxxxxxxx <75231.2457@xxxxxxxxxxxxxx>
Date: March 3, 1998 12:19 AM
Subject: Re: ROC indicators

>Sounds easy enough to program - just so I understand - theory is that
where
>all 3 ROC's become positive on a bar after being negative on the previous
>bar this would be considered a buy signal.  What if all three ROC's change
>from negative to positive but on different bars is this considered a buy?
>
>Code in TradeStation assuming all ROC's have to change on the same bar
would
>be something like the following:
>
>Vars:    ROC7(0), ROC14(0), ROC20(0);
>
>ROC7=RateofChange(Close,7);
>ROC14=RateofChange(Close,14);
>ROC20=RateofChange(Close,20);
>
>If ROC7>0 and ROC14>0 and ROC20>0 and ROC7[1]<0 and ROC14[1]<0 and
>ROC20[1]<0 then buy at market;
>If ROC7<0 and ROC14<0 and ROC20<0 and ROC7[1]>0 and ROC14[1]>0 and
>ROC20[1]>0 then buy at market;
>
>Of course in order to make into a complete system would have to include
some
>sort of exit strategy.  Let me know if you have any further details on how
>system would work.
>
---------------------------------------------------------------------------
--------

On Mar 5, 10:46am, TheGonch at MediaKat wrote:
> > A variation of the above that I like is:  (Close[0] - Close[n] /
squareroot
> > of the time period used).
> > 
> >         ((Close[0] - Close[5]) / squareroot (5)).

The above formula has the advantage, that it will let you compare ROC's
calculated at different time frames, because theoretically, the deviation
will vary as the squae root of the time frame.  If you want to oonvert
the formula above to percent ROC%, then
        100 * (C[0] - C[L]) / (C[L] * squareroot (L));
where L is the length in bars (days).
-- 
--
| Gary Funck,  Intrepid Technology, gary@xxxxxxxxxxxx, (650) 964-8135

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

SEAN W. HUNT wrote:
> 
> 
> Basic ROC formula is:  Price - Price(n periods).  Price can be anything
you
> want;  Close,  High, Low, or combination thereof.  I.E. a 5 period ROC =
> Close[0] - Close[5].
> 
> A variation of the above that I like is:  (Close[0] - Close[n] /
squareroot
> of the time period used).
> 
>         ((Close[0] - Close[5]) / squareroot (5)).
> 
> Regards,
> 
> Sean Hunt
> San Francisco


I have also seen %ROC, where the % price change over the period is used
instead of the absolute price change, used to adjust for stocks that are
very volatile.

DanG