talib.roc
Rate of change of source measured across length bars.
Where talib.change gives the difference, this gives the rate.
talib.roc(series float source, series int length) → series float| Parameter | Type | Required | Description |
|---|---|---|---|
source | series float | yes | The series to measure. |
length | series int | yes | How far back the measurement reaches. |
Returns series float — A series float.
indicator("Rate of change")
plot(talib.roc(close, 9))See also talib.alma · talib.atr · talib.barssince
Part of the function index.
Ready to put this into practice?
Try GoCharting Premium
Unlock advanced orderflow, market profile, options desk, and real-time data — everything you just read about, live in your charts.