SMA Pass
Simple Moving Average — Series Input
IndicatorTrendOverlay
Overview
SMA Pass applies the Simple Moving Average to any upstream numeric series. It computes the arithmetic mean of the last `period` values, producing an equal-weight smoothed series. Null is returned for bars with fewer than `period` non-null values in the window.
Formula
SMA[t] = (Σ x[t−i]) / period for i = 0..period−1
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| period | number | 10 | 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. |