Using the definition of ROC in the Wiki,
"ROC(bar) = 100 * ( ( Pricebar / Pricebar - period ) - 1 )"
Is there a difference between
"ROC(Close,5)" and "100 * Close / (Cose >> 5) - 1" ?
If not, is there a strong reason to prefer one over the other? Which one?
Finally, is there a way to access a single bar value of ROC without creating a new data series?
TIA
Size:
Color:
QUOTE:
Finally, is there a way to access a single bar value of ROC without creating a new data series?
Yes, the ROC
.Value method.
CODE:
Please log in to see this code.
There should be no difference and you can use any version but the correct version of your code would be:
QUOTE:
"100 * (Close / (Close >> 5) - 1)"
Size:
Color:
Thanks
Size:
Color: