# Gaussian Channel

Based on the Gaussian Channel indicator (DonovanWall). A true Gaussian filter is
approximated by applying EMA through itself four times (4-pole EMA), then adding
ATR-based bands above and below.

## Versions

| Version | File    | Notes                                                                  |
|---------|---------|------------------------------------------------------------------------|
| v2      | v2.json | Persistent `compare` for band break (holds while above upper band)     |
| v3      | v3.json | Uses `cross_over`/`cross_under` — signals only on the transition bar   |

## Logic

**4-pole EMA (period 20)**: `EMA(EMA(EMA(EMA(close, 20), 20), 20), 20)`
**Upper band**: 4-pole-EMA + 1.6 × ATR(14)
**Lower band**: 4-pole-EMA − 1.6 × ATR(14)

**Entry** (v2): `close > upper_band` AND 4-pole-EMA rising (slope positive). Holds
while these conditions remain true — re-enters after any exit if price is still above band.

**Entry** (v3): `close cross_over upper_band` AND 4-pole-EMA rising. Single-bar
transition only — avoids re-entry while price stays above the band.

**Exit** (both): `close < lower_band` OR 4-pole-EMA declining (slope negative).

## Indicators

- `EMA` applied 4× (Gaussian approximation), period 20 at each pole
- `ATR(14)` — band width

## Data requirements

- 1h candles recommended.
- Minimum warmup: ~80 candles for 4-pole EMA (4 × 20).

## Known limitations

- 4-pole EMA is a Gaussian approximation, not a true Gaussian filter (which would
  require a convolution kernel not expressible in the DSL).
- ATR-based bands are symmetric; volatility asymmetry is ignored.
