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
| Parameter | Type | Default | Description |
|---|---|---|---|
| period | number | 14 | Regression window length in bars. |
Inputs & Outputs
| Port | Direction | Type | Description |
|---|---|---|---|
| input | Input | (number | null)[] | Any numeric series (values + timestamps). |
| values | Output | (number | null)[] | Smoothed output series, null for warm-up bars. |
| timestamps | Output | number[] | Bar timestamps aligned with values. |