What's the difference between the ROC() and CHANGE() functions?

Optuma Forums Optuma Scripting What's the difference between the ROC() and CHANGE() functions?

This topic contains 0 replies, has 1 voice, and was last updated by Darren Darren 8 months, 3 weeks ago.

Viewing 1 post (of 1 total)
  • Author
  • #44607
    • Topics: 28
    • Replies: 145
    • Posts: 173

    The Rate of Change ROC() and CHANGE() functions are essentially the same (ie they calculate the % change over a user-defined lookback period). For example, the following columns on a daily watchlist will give the same values using the different functions. (Note that ROC(BARS=5) will only be the same as CHANGE(INT_TYPE=Week) in a 5 day trading week.)


    However, the results will be different when changing timeframes.

    For example, ROC(Week(PERIODAMOUNT=1), BARS=1) uses weekly data, so will use the previous week’s (Friday) close to calculate the percentage change, whereas CHANGE(INT_TYPE=Week) will be a rolling weekly change, ie, Monday to Monday, Wednesday to Wednesday, etc.

    As such, when viewed on a Friday both will have the same values – as long as the markets were open on Friday – but on a Wednesday the ROC(Week(PERIODAMOUNT=1), BARS=1) function will show the performance of just the current week (since Friday) and the CHANGE(INT_TYPE=Week) will calculate Wednesday to Wednesday.

    Here’s an example comparing the two in a watchlist column and Time Price Measure tool on the chart of XIJ (notice the Bars and Days counts).




    • This topic was modified 8 months, 3 weeks ago by Darren Darren.
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

Pin It on Pinterest

Share This

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.