What is (Close,1) in ROC?
Author: eralbanese
Creation Date: 9/9/2020 5:13 AM
profile picture

eralbanese

#1
Hello, I’m still learning to code and ran across code similar to this:

CODE:
Please log in to see this code.


Can somebody explain what this line of code is doing? I understand it is returning the highest value of a ROC series but the (close, 1) throws me off.

Thanks

profile picture

Eugene

#2
Hi Eric,

When you have doubts regarding an indicator's syntax, highlight the indicator in Wealth-Lab's Indicators window and click "More info...". This will lead you to the online user guide a.k.a. the Wiki. Specifically, ROC is documented here:

* ROC (among Pages of the Category Standard Indicators)

Consequently, this is the 1-day Rate of Change in the Close price. (To compare, a 252-period ROC would roughly equal the annual rate of change.) And yes, the line boils down to the highest 1-day rate of change.
profile picture

eralbanese

#3
Thanks Eugene, what does the 9 represent?
profile picture

eralbanese

#4
I assume the highest ROC (1 day)in the last 9 bars.
profile picture

Eugene

#5
You're welcome. Highlight the Highest indicator and click "More info".
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).