# SWMA

Plots the symmetric weighted moving average: the classic 4-bar 1-2-2-1 kernel by default, generalized to any window with mirrored weights, always delaying what it passes by exactly (length - 1) / 2 bars. Slope coloring and turn alerts, an optional longer average fed by the SWMA in its documented pre-filter role, and a dashboard stating the window and its constant delay.

- Indicator in the LuxAlgo Library, by LuxAlgo, published May 3, 2026.
- Access: free.
- Concepts: [SWMA](https://www.luxalgo.com/library/concept/swma/) (primary)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=frlb9c5oq8nvhwf8uy0s9337
- Page: https://www.luxalgo.com/library/indicator/swma/

**SWMA** puts the symmetric weighted moving average on the chart with its defining property made explicit: constant, known delay. The default 4-bar window applies the classic 1-2-2-1 weights of the [SWMA](https://www.luxalgo.com/library/concept/swma/); any other Window Length builds the generalized mirrored profile, interior bars counting double and both edges single. Symmetry buys linear phase: everything the filter passes arrives exactly (length − 1) / 2 bars late, and the dashboard states that delay outright, so you always know how far behind the line runs.

## How to Trade the SWMA?

- **Slope color**: the line colors by the sign of its bar-to-bar change, comparing consecutive SWMA values as the gentler stand-in for comparing consecutive closes.
- **Turn events**: slope flips from falling to rising and the reverse can print circle markers and always carry the two alerts.
- **Pre-filter role**: enable the pre-filtered average and a longer moving average is computed on the SWMA output instead of raw price. One-bar spikes are removed before the slower average sees them, at the cost of the same small fixed delay.

## SWMA Settings

- **Source** (default close): series the symmetric weights are applied to.
- **Window Length** (default 4): bars in the symmetric window: 4 is the standard fixed SWMA; larger windows smooth more with proportionally more delay.
- **Show Pre-Filtered Average** (default off) with **Method** (default SMA; also EMA, RMA, WMA) and **Length** (default 20): the documented pre-smoothing stage.
- **Show Dashboard** (default on) with **Location** (Top Right) and **Size** (Small).
- Style: **Directional Coloring** (default on) and **Show Turn Markers** (default off).

## Frequently Asked Questions

### What separates the SWMA from a WMA of the same length?

The weight shape. A standard weighted average loads the newest bars most heavily, chasing price at the cost of uneven timing across components; the SWMA mirrors its weights around the window's center so everything it passes shares one delay. The [Sine Weighted MA](https://www.luxalgo.com/library/indicator/sine-weighted-ma/) sits in the same symmetric family with a smoother bell of weights.

### Is four bars enough to define a trend?

No, and it is not meant to be. The fixed form is a fast noise reducer: the double-weighted center suppresses one-bar spikes with only 1.5 bars of delay. For trend definition, raise the Window Length or run the SWMA as the pre-filter under a longer average.

### Why does the line look shifted rather than lagging unevenly?

That is linear phase: a center-symmetric kernel delays every passed component equally, so the smoothed line keeps the shape of slow moves instead of warping them. Recursive averages smear timing across frequencies; this one trades a fixed shift for shape fidelity.

## Related indicators

- [Trend Regularity Adaptive Moving Average](https://www.luxalgo.com/library/indicator/trend-regularity-adaptive-moving-average/) (TRAMA): markdown at https://www.luxalgo.com/library/indicator/trend-regularity-adaptive-moving-average.md
- [Machine Learning Moving Average](https://www.luxalgo.com/library/indicator/machine-learning-moving-average/) (Adaptive-lookback MA): markdown at https://www.luxalgo.com/library/indicator/machine-learning-moving-average.md
- [ZLEMA](https://www.luxalgo.com/library/indicator/zlema/) (Trend): markdown at https://www.luxalgo.com/library/indicator/zlema.md
- [Moving Average Converging](https://www.luxalgo.com/library/indicator/moving-average-converging/) (EMA): markdown at https://www.luxalgo.com/library/indicator/moving-average-converging.md
- [MLMA](https://www.luxalgo.com/library/indicator/mlma/) (Trend): markdown at https://www.luxalgo.com/library/indicator/mlma.md
- [Volume-adjusted MA](https://www.luxalgo.com/library/indicator/volume-adjusted-ma/) (Trend): markdown at https://www.luxalgo.com/library/indicator/volume-adjusted-ma.md
- [JMA](https://www.luxalgo.com/library/indicator/jma/) (Trend): markdown at https://www.luxalgo.com/library/indicator/jma.md
- [T3](https://www.luxalgo.com/library/indicator/t3/) (Trend): markdown at https://www.luxalgo.com/library/indicator/t3.md

---

Source: https://www.luxalgo.com/library/indicator/swma/ (LuxAlgo Library). Free to use with attribution: https://www.luxalgo.com/library/license/
