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

Trend / Reference

alerta.ta.linreg

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

Calculates the Linear Regression value over an N-bar window.

alerta.ta.linreg(source, length, offset) → series float

Parameters

NameTypeRequiredDefaultDescription
sourceseriesYes—Series of values to process.
lengthintYes—Number of bars (length).
offsetintNo—Regression offset (default 0).

Returns

series float

Example

alerta.ta.linreg
plot(linreg(close, 14, 0))

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.