# Windowed FIR Smoothing

Windowed FIR Smoothing is an indicator on [Vela](https://vela.luxalgo.com/chart), our next-generation charting platform, written in Pine Script®.

Smooths price with a windowed FIR average, Hann weights by default, with Hamming, Triangular and Rectangular (SMA) profiles, over a 21-bar lookback, colored by slope on the chart. An optional 50-bar second average forms a fast/slow pair with a difference fill and cross alerts, and a dashboard reports each window's exact (N - 1) / 2 bar delay.

- Indicator in the LuxAlgo Library, by LuxAlgo, published Mar 24, 2026.
- Access: free.
- Concepts: [Windowed FIR Smoothing](https://www.luxalgo.com/library/concept/windowed-fir-smoothing/) (primary)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=qi40k5jdjedp9r3n1d881v2r
- Page: https://www.luxalgo.com/library/indicator/windowed-fir-smoothing/

**Windowed FIR Smoothing** is the definitive clean build of [windowed FIR smoothing](https://www.luxalgo.com/library/concept/windowed-fir-smoothing/): a moving average whose weights come from a chosen window profile, normalized to sum to one. Hann tapers to zero at both edges, Hamming leaves the edges a small residual weight, Triangular ramps to the middle, and Rectangular weights every bar equally, exactly the simple moving average. Symmetric FIR weights delay everything equally, so the cost is a known constant of (N - 1) / 2 bars, and the dashboard states it outright.

## How to Trade the Windowed FIR Smoothing?

- **Slope as trend**: the line rising or falling is the regime read of the smoother, with slope-turn alerts at each flip.
- **Price crossings**: the source crossing the FIR Average reads exactly like a moving-average cross; optional markers, alerts either way.
- **Fast/slow pair**: with the second average shown, the fill tracks which line is on top, a two-average momentum gauge with cross alerts.

The Delay-Aligned Reference re-plots the primary average shifted back by its delay, so the shifted line lands on the price movement it preserved, a benchmark for judging faster, overshoot-prone filters.

## Windowed FIR Smoothing Settings

- **Source** (default close): series being smoothed.
- **Window** (default Hann): the weight profile; Hamming, Triangular and Rectangular (SMA) are alternatives.
- **Length** (default 21): bars N in the window. Pick it with the (N - 1) / 2 bar delay in mind.
- **Show Second Average** (default off) and **Second Length** (default 50): the slower half of the fast/slow pair.
- **Show Dashboard** (default on), **Position** (default Top Right), **Size** (default Small): the window, length and delay readout.
- Style toggles: **Slope Trend Coloring** and **Fill Between Averages** (on by default); **Delay-Aligned Reference** and **Price Crossing Markers** (off by default).

## Frequently Asked Questions

### How does this differ from a ZLEMA?

They make opposite bargains with lag. A [ZLEMA](https://www.luxalgo.com/library/indicator/zlema/) extrapolates recent change to cancel delay, buying speed with overshoot; a symmetric FIR window accepts a fixed, exactly known delay and never overshoots what the data did.

### Which window should I pick?

Hann is the default for its clean taper; Hamming keeps a touch of edge weight; Triangular sits between; Rectangular reproduces the SMA. At typical lengths the differences are subtle. Compare profiles on the same length rather than hunting magic numbers.

### What is the Second Average for?

Published designs difference two windowed averages and read the gap as momentum. The fill shows which is on top and the cross alerts fire on sign changes. Set the second length longer so the pair reads fast versus slow.

## Related indicators

- [Chebyshev Filters](https://www.luxalgo.com/library/indicator/chebyshev-filters/) (Trend): markdown at https://www.luxalgo.com/library/indicator/chebyshev-filters.md
- [Laguerre Filter](https://www.luxalgo.com/library/indicator/laguerre-filter/) (Trend): markdown at https://www.luxalgo.com/library/indicator/laguerre-filter.md
- [Elliptic Filter](https://www.luxalgo.com/library/indicator/elliptic-filter/) (Trend): markdown at https://www.luxalgo.com/library/indicator/elliptic-filter.md
- [Gaussian Filter](https://www.luxalgo.com/library/indicator/gaussian-filter/) (Trend): markdown at https://www.luxalgo.com/library/indicator/gaussian-filter.md
- [Swiss Army Knife Filter](https://www.luxalgo.com/library/indicator/swiss-army-knife-filter/) (Trend): markdown at https://www.luxalgo.com/library/indicator/swiss-army-knife-filter.md
- [Ehlers SuperSmoother](https://www.luxalgo.com/library/indicator/ehlers-supersmoother/) (Trend): markdown at https://www.luxalgo.com/library/indicator/ehlers-supersmoother.md
- [Ehlers Instantaneous Trendline](https://www.luxalgo.com/library/indicator/ehlers-instantaneous-trendline/) (Trend): markdown at https://www.luxalgo.com/library/indicator/ehlers-instantaneous-trendline.md
- [Whittaker Envelope](https://www.luxalgo.com/library/indicator/whittaker-envelope/) (Whittaker–Henderson Smoother): markdown at https://www.luxalgo.com/library/indicator/whittaker-envelope.md

---

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