SWMA
The SWMA, or symmetric weighted moving average, is a moving average whose weights are mirrored around the center of its window. SWMA, also known as symmetric weighted MA, is a Trend concept. The Library holds 1 implementation, ready to run on Vela.
Top SWMA indicator
The top custom implementation, built on the original standard SWMA formula.
1 total
Open the SWMA implementation below on Vela, then have Quant, our coding agent, turn it into a strategy you can backtest.
What is the SWMA?
The SWMA, or symmetric weighted moving average, is a moving average whose weights are mirrored around the center of its window. In the form most traders meet it (the built-in found in popular charting platforms), it is a fixed four-bar average with weights 1/6, 2/6, 2/6, 1/6: the two middle bars count double, the two outer bars count single, and the weights sum to one. More broadly, the term covers any finite moving average with center-symmetric weights, a family that also includes the triangular MA and the sine-weighted MA.
The symmetry is not cosmetic; it is the defining engineering property. A symmetric finite-impulse-response filter has exactly linear phase, meaning every frequency component it passes is delayed by the same fixed amount, (n - 1) / 2 bars for a window of n. The smoothed line is therefore an undistorted, uniformly shifted copy of the low-frequency content of price. Recursive averages like the EMA cannot make that claim: they delay slow swings and fast wiggles by different amounts, subtly warping the shape of moves.
Traders care about the four-bar SWMA mostly as a fast, cheap noise reducer. With a delay of exactly 1.5 bars it barely lags, and its double-weighted center suppresses single-bar spikes better than a plain four-bar SMA. It is common as a pre-smoothing stage inside composite indicators rather than as a standalone signal line, since four bars of smoothing is far too little to define a trend by itself.
How it's calculated
The standard fixed-length form uses four bars with symmetric weights summing to one:
This 1-2-2-1 weighting over four bars is the common charting-platform implementation and takes no length input.
Generalized symmetric versions use any mirrored weight profile over n bars; all share a constant delay of (n - 1) / 2 bars.
Because the window is symmetric, applying the weights forward or backward gives the identical result.
How traders use it
- As a pre-filter: smoothing the input of an oscillator or a longer average with the four-bar SWMA knocks out one-bar spikes at a cost of only 1.5 bars of delay, often cleaning signals more than it slows them.
- As a gentler price proxy in bar-by-bar logic: rules that compare consecutive closes can compare consecutive SWMA values instead, reducing sensitivity to single aberrant prints.
- Longer symmetric weightings are chosen when downstream logic measures swing shape or timing, because the uniform delay of symmetric filters preserves waveform geometry; see also windowed FIR smoothing for the general design approach.
- Its limitation is scope: four bars of smoothing does not filter regime noise, and the fixed length offers no tuning. It removes texture, not chop, and should not serve as a trend filter on its own.
SWMA vs neighboring weighted averages
WMA: The WMA weights bars linearly toward the most recent, deliberately asymmetric to cut lag. The SWMA's mirrored weights accept a fixed centered delay in exchange for distortion-free smoothing.
Triangular MA: The triangular MA is the length-adjustable member of the same symmetric family, with weights rising linearly to the window center. The common SWMA is essentially a compact fixed four-bar relative.
Sine-weighted MA: The sine-weighted MA shapes its symmetric weights with a half sine wave, giving a smoother rolloff of the window edges. Same linear-phase property, different weight profile and selectable length.
SWMA FAQ
Turn SWMA into a trading strategy.
Open the implementation from this page in Vela. Quant, our coding agent, builds the strategy with you and backtests it on real data.
Browse this familyTrend104 concepts mapped · 104 in the Library
- Adaptive-lookback MA
- ADX / DMI System
- Alligator
- ALMA
- Anchored MA
- Andrews' Pitchfork
- Aroon
- ATR Trailing Regime
- Bessel Filter
- Breakout
- Butterworth Filter
- Chande Kroll Stop
- Chandelier Stop
- Chebyshev Filters
- Climactic Moves
- Continuation
- Coral Trend
- Correlation Trend Indicator
- Death Cross
- DEMA
- Displaced MA
- Donchian Trend Rules
- Dynamic S/R Via MA
- Ehlers Instantaneous Trendline
- Ehlers SuperSmoother
- Elastic Volume-weighted MA
- Elliptic Filter
- EMA
- Fan Principle
- FRAMA
- Gann Box
- Gann Fan & Angles
- Gann HiLo Activator
- Gann Method
- Gann Square of 9
- Gaussian Filter
- Geometric MA
- Golden Cross
- Guppy GMMA
- Halftrend
- Harmonic MA
- Higher-timeframe Trend Filter
- HMA
- Ichimoku Signals
- Ichimoku System
- Ichimoku Theories
- JMA
- KAMA
- Kaufman Efficiency Ratio
- Laguerre Filter
- Linear-regression Channel
- LSMA
- MA Envelope
- MA of MA
- MA Ribbon
- MA Slope Filter
- MAMA/FAMA
- McGinley Dynamic
- MLMA
- Moving Average Crossovers
- NRTR
- Order-statistic Filters
- Parabolic SAR
- Parallel Channel
- Polynomial Regression Band
- Pullback
- R-squared Trend Fit
- Rainbow MA Stack
- Random Walk Index
- Range Filter
- Retest
- Reversal
- RMA
- Savitzky-Golay Filter
- Sine-weighted MA
- SMA
- Speed Resistance Lines
- Standard-error Channel
- Supertrend
- Swiss Army Knife Filter
- SWMA
- T3
- TEMA
- TRAMA
- Trend Acceleration/inflection
- Trend Exhaustion
- Trend Intensity Index
- Trend Magic
- Trend Regime Label
- Trend-quality Composites
- Trendline
- Triangular MA
- UHL Adaptive MA
- Ultimate Smoother
- Vertical Horizontal Filter
- VIDYA
- Volume-adjusted MA
- Vortex
- VWMA
- Weinstein Stage Analysis
- Whittaker–Henderson Smoother
- Windowed FIR Smoothing
- WMA
- ZLEMA
