# Supertrend

A popular trend-following indicator that uses ATR to define a trailing stop-like
line. When price crosses the line upward the trend is bullish; when it crosses
downward the trend is bearish.

## Versions

| Version | File    | Notes                                        |
|---------|---------|----------------------------------------------|
| v2      | v2.json | Pure Supertrend crossover; no regime filter  |
| v3      | v3.json | Adds ADX(14) > 25 to avoid ranging markets   |

## Logic

**Calculation**: Supertrend(10, 3.0) — ATR period 10, multiplier 3.0.

**Entry** (v2): close crosses above the supertrend line (bullish flip).
**Entry** (v3): same PLUS ADX(14) > 25 (trending regime confirmed).
**Exit** (both): close crosses below the supertrend line (bearish flip).

## Indicators

- `Supertrend(10, 3.0)` — stateful ATR-based trailing line
- `ADX(14)` — Average Directional Index (v3 only)

## Data requirements

- 1h candles recommended.
- Minimum warmup: ~25 candles for ATR(10) + supertrend initialisation.

## Known limitations

- Supertrend alone has no volume or trend-strength confirmation; it can whipsaw
  in low-volatility sideways markets. The ADX gate in v3 mitigates this.
- The `multiplier` parameter (3.0) is hardcoded; a looser multiplier (e.g. 2.0)
  produces more signals with higher false-positive rate.
