Back to Docs
Traderoid

LSMA Pass

Least Squares Moving Average — Series Input

IndicatorTrendOverlay

Overview

LSMA Pass applies the Least Squares Moving Average (linear regression value) to any upstream numeric series. At each bar it outputs the endpoint of a linear regression line fitted to the last `period` bars, producing a responsive smoothed estimate.

Formula

Fit OLS line y = a + b·i over last `period` bars LSMA[t] = a + b·(period − 1)

Parameters

ParameterTypeDefaultDescription
periodnumber14Regression window length in bars.

Inputs & Outputs

PortDirectionTypeDescription
inputInput(number | null)[]Any numeric series (values + timestamps).
valuesOutput(number | null)[]Smoothed output series, null for warm-up bars.
timestampsOutputnumber[]Bar timestamps aligned with values.