# Gaussian Filter

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

John Ehlers' recursive Gaussian filter as a trend baseline: price runs through up to four cascaded single-pole stages (Period 14, Poles 4), pushing the combined response toward the Gaussian bell for a rounder, steadier line than a one-stage smoother of the same period. Slope-based coloring, a price/filter gradient fill, optional crossing markers and four alerts are built in.

- Indicator in the LuxAlgo Library, by LuxAlgo, published Feb 10, 2026.
- Access: free.
- Concepts: [Gaussian Filter](https://www.luxalgo.com/library/concept/gaussian-filter/) (primary)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=nsatfqfs2r620mixp27ss5fq
- Page: https://www.luxalgo.com/library/indicator/gaussian-filter/

**Gaussian Filter** smooths price by running it through the same simple smoothing stage up to four times in a row, so the cascade's combined response approaches the Gaussian bell and the line comes out round and steady. This build follows John Ehlers' published recursive recipe for the [Gaussian filter](https://www.luxalgo.com/library/concept/gaussian-filter/): the per-stage coefficient is derived from the period and pole count, and the selected pole's output is the plotted line. The result reads as a trend baseline: slope carries the regime, and price's side of the line frames the structure around it.

## How to Trade the Gaussian Filter?

- **Slope color**: with Slope Trend Coloring on, the line is bullish while rising and bearish while falling. Slope turns are alertable in both directions and make clean regime markers.
- **Price crossings**: the standard moving-average crossover grammar on a smoother line, with fewer whipsaw crosses than a raw average; optional triangles mark them, and both directions are alertable.
- **Fill direction**: the gradient between price and filter shows which side price is riding. Persistent one-sided fills characterize trends, alternating fills congestion.

## Gaussian Filter Settings

- **Source** (default close): the series being smoothed; feeding another indicator's output through it covers the pre-smoother use.
- **Period** (default 14): the cutoff the per-stage coefficient is derived from. Longer gives a rounder, slower line, shorter tracks price but passes more noise.
- **Poles** (default 4): identical stages in series. Each extra pole adds smoothness and lag at the same period and pushes the response closer to the bell; one pole behaves much like an EMA, and four is the cap in Ehlers' original.
- Style: **Slope Trend Coloring** (on), **Price / Filter Gradient Fill** (on), **Price Crossing Markers** (off), plus bullish, bearish and neutral colors.

## Frequently Asked Questions

### Gaussian Filter or the SuperSmoother?

Both are Ehlers designs chasing smoothness without runaway lag. The [Ehlers SuperSmoother](https://www.luxalgo.com/library/indicator/ehlers-supersmoother/) is a two-pole design built to reject fast noise while giving up as little speed as possible, while the Gaussian cascade accepts slightly more lag for a bell-shaped, ripple-free response, and its pole count gives an explicit smoothness dial.

### How should I choose the pole count?

Treat it as a smoothness dial at fixed period: one pole for responsiveness, four for the roundest line. If you find yourself shortening the period to offset added lag, try fewer poles instead. The two settings trade off differently.

### Does the filter repaint?

No. It is a causal recursion over current and past values only: once a bar closes its value is fixed, and alerts evaluate on the same series.

## 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
- [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
- [Percentile Nearest Rank Using Arrays](https://www.luxalgo.com/library/indicator/percentile-nearest-rank-using-arrays/) (Order-statistic Filters): markdown at https://www.luxalgo.com/library/indicator/percentile-nearest-rank-using-arrays.md

---

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