Smoothed Rate of Change

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #19836 quote
    CarlosFC
    Participant
    New

    I would like to ask you about another indicator derivated from ROC and that I am sure you know, the Smoothed Rate of Change, developped by Fred G. Schutzman and mentioned by Alexander Elder in” Trading for a living”. I looked in different places but it seems they’re using not exactly the same formula to calculate it. I am using bellow’s one. Could you please let me know if it’s correct?

    Many thanks in advance.

    Carlos.

    media=ExponentialAverage[13](close)
    Signal=ROC[21](close)
    ROCAL=signal/media*100
    Return ROCAL as "ROC Alisado"
    
    #19940 quote
    Nicolas
    Keymaster
    Master

    This is what I found about the Smoothed Rate of change (S-ROC):

    Smoothed Rate of Change (S-RoC) is a refinement of Rate of Change (RoC) that was developed by Fred G Schutzman. It differs from the RoC in that it based on exponential moving averages (EMAs) rather than on price closes. Like the RoC, Smoothed RoC is a leading momentum indicator that can be used to determine the strength of a trend by determining if the trend is accelerating or decelerating. The S-RoC does this by comparing the current EMA to value that the EMA was a specified periods ago. Thus, a 7-day S-RoC compares the current EMA to the value that the EMA was seven days ago. The use of EMAs rather than the price close illuminates the erratic tendencies of the RoC.

    How is it calculated?

    RoC is calculated in three steps. First, the EMA is calculated. Then the momentum of the change in the EMA is calculated by subtracting the previous value of the EMA from the current EMA. Finally, the result is divided by the previous value of the EMA and multiplied by 100 to give a percentage. As the S-RoC is a RoC of EMA, it takes two periods: the period of the EMA, with the default being 13; and the period of the RoC, with the default being 21. The formula is:
    S-RoC = ( Current EMA – Previous EMA ) / ( Previous EMA ) x 100
    where the previous EMA is the value that the EMA was at specified period ago. The result is a percentage that is plotted as an oscillator that oscillates between 100% and -100%.


    So here is the code for prorealtime from this description:

    EMAperiod = 13
    ROCperiod = 21
    
    EMA = exponentialaverage[EMAperiod](close)
    
    SRoC = ( EMA - EMA[ROCperiod] ) / ( EMA[ROCperiod] ) * 100
    
    RETURN SRoC as "Smoothed ROC", 0 as "0"

    Tell me if it’s OK for you and I’ll add it to the Library. You were not too far with your code though, the “Signal” variable calculation you made need to be applied on “media” and not on Close, and you’ll get the same curve as mine.

    #19961 quote
    CarlosFC
    Participant
    New

    Thanks a lot Nicolas,

    After sending my previous post I was re-reading what Alexander Elder says about how to calculate Smooth ROC. I finally got this code:

    indicator1=ExponentialAverage[13](close)
    indicator2=ExponentialAverage[13](close)
    
    c1=(indicator1/indicator2[21])
    
    RETURN c1 as "sROC"

    Compared with yours seems to be the same. Just the scale is different:

    https://gyazo.com/a67f5d9a4a206f919293efa3008ff12d

    What do you think?

    Regards and thanks again.

    Carlos.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Smoothed Rate of Change


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
CarlosFC @carlosfc Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by CarlosFC
9 years, 1 month ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 01/04/2017
Status: Active
Attachments: No files
Logo Logo
Loading...