# Swiss Army Knife Filter

Runs John Ehlers' generalized second-order recursion and plugs in one of seven coefficient sets (EMA, Gaussian, Butterworth, two high-pass forms, band-pass or band-stop) from a single 20-bar Period input. Price-domain types draw over price, oscillator types center on zero in the pane, a table exposes the five live coefficients, and a comparison instance can run alongside.

- Indicator in the LuxAlgo Library, by LuxAlgo, published Jun 24, 2026.
- Access: free.
- Concepts: [Swiss Army Knife Filter](https://www.luxalgo.com/library/concept/swiss-army-knife-filter/) (primary), [Ehlers Bandpass Filter](https://www.luxalgo.com/library/concept/ehlers-bandpass-filter/)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=drspxpum43tz22usnrbzrtep
- Page: https://www.luxalgo.com/library/indicator/swiss-army-knife-filter/

**Swiss Army Knife Filter** is one filter wearing seven outfits: a single second-order recursion whose behavior is decided entirely by its coefficient set, the [Swiss Army Knife filter](https://www.luxalgo.com/library/concept/swiss-army-knife-filter/) realized as published. Gaussian (the default), EMA, Butterworth and Band Stop follow price on the main chart; High Pass, 2 Pole High Pass and Band Pass draw as centered oscillators in the pane, detrending the source or isolating one cycle wavelength. The coefficient table prints the five live values (b0, b1, b2, a1, a2), the running filter's complete definition.

## How to Trade the Swiss Army Knife Filter?

- **Price-domain types**: the source crossing the filter line is the basic event, alerted both ways, with optional triangle markers.
- **Oscillator types**: zero crossings mark the detrended series or isolated cycle changing sign, likewise alerted.
- **Honest comparison**: the comparison instance runs a second coefficient set through the identical routine on the same source. Output differences are filter response, not implementation quirks.

## Swiss Army Knife Filter Settings

- **Source** (default close): series fed to the recursion.
- **Filter Type** (default Gaussian): the coefficient row: EMA, Gaussian, Butterworth, High Pass, 2 Pole High Pass, Band Pass or Band Stop.
- **Period** (default 20): cutoff period of the low- and high-pass rows, center wavelength of the band rows.
- **Bandwidth** (default 0.1): half-bandwidth of the band rows. Narrower is more selective but rings longer; ignored by other types.
- **Enable Comparison Filter** (default off) with **Type** (default Band Pass) and **Period** (default 20); bandwidth is shared.
- **Show Coefficient Table** (default on) with **Location** (Top Right) and **Size** (Small); **Line Width** (default 2), **Crossing Markers** (default off).

## Frequently Asked Questions

### How does this relate to the standalone Butterworth build?

The Butterworth row computes the same published two-pole design as the dedicated [Butterworth Filter](https://www.luxalgo.com/library/indicator/butterworth-filter/), so both packagings produce the same line. The difference is architectural: seven responses swappable without touching anything but coefficients.

### Which filter type should I reach for?

Match the type to the question: Gaussian and Butterworth are general-purpose smoothers, EMA is the one-pole reference, the high-pass rows strip trend before cycle work, Band Pass isolates a suspected cycle at the Period, and Band Stop removes one.

### Why do sharp band settings misbehave early in the chart?

The recursion is seeded with its first outputs equal to the input, and narrow-band configurations ring longer, so they need more warm-up bars. Judge them away from the start of history.

## Related indicators

- [Normalized Resonator](https://www.luxalgo.com/library/indicator/normalized-resonator/) (Ehlers Bandpass Filter): markdown at https://www.luxalgo.com/library/indicator/normalized-resonator.md
- [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
- [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/swiss-army-knife-filter/ (LuxAlgo Library). Free to use with attribution: https://www.luxalgo.com/library/license/
