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
Size:
Color:
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.
Size:
Color:
Thanks Eugene, what does the 9 represent?
Size:
Color:
I assume the highest ROC (1 day)in the last 9 bars.
Size:
Color:
Size:
Color: