Skip to content
AlertaChartAlertaScript / docs
AlertaScript / alerta.ta.roc
On this pageSignatureParametersReturnsExample

Momentum / Reference

alerta.ta.roc

TradingView-compatible spelling: ta.roc, runs without warnings

Calculates the Rate of Change (percent) over an N-bar period.

alerta.ta.roc(source, length) → series float

Parameters

NameTypeRequiredDefaultDescription
sourceseriesYes—Series of values to process.
lengthintYes—Number of bars (length).

Returns

series float

Example

alerta.ta.roc
plot(roc(close, 9), { pane: "oscillator" })

Names and aliases

Guides and navigation are localized. Built-in reference descriptions and code examples are maintained in English.

AlertaScript

No results found.

Search by name, alias, or keyword.