# Simple Trend + Regime Filter

A baseline trend-following strategy using an EMA crossover for signal generation,
with an optional ADX regime filter to avoid trading in ranging markets.

## Versions

| Version | File    | Notes                                                |
|---------|---------|------------------------------------------------------|
| v1      | v1.json | EMA(20/50) crossover only; no regime filter          |
| v2      | v2.json | Adds ADX(14) > 25 gate — only trades trending regime |

## Logic

**Entry**: Fast EMA (20) crosses above slow EMA (50).
**Exit**: Fast EMA crosses back below slow EMA.

v2 adds a regime gate: ADX(14) must be above 25 (trending, not ranging) before
the crossover is accepted as a valid signal.

## Indicators

- `EMA(20)` — fast exponential moving average on close
- `EMA(50)` — slow exponential moving average on close
- `ADX(14)` — Average Directional Index (v2 only)

## Data requirements

- 1h candles recommended.
- Minimum warmup: ~50 candles for EMAs + 14 for ADX (v2).

## Known limitations

- The choppiness index (a more nuanced ranging filter) is not in the DSL. ADX > 25
  is a reasonable proxy.
- EMA crossovers lag by nature; whipsaws occur in sideways markets even with ADX filter.
- No stop-loss; relies entirely on the exit crossover.
