# qta

Streaming technical analysis indicators for quantitative trading.

## Indicators

| Module   | Description                                                                 |
| -------- | --------------------------------------------------------------------------- |
| `zigzag` | Streaming ZigZag swing detection — no-repaint, O(1) state, range-bar native |

## Quick Start

```rust
use qta::{ZigZagConfig, ZigZagState, BarInput};

let config = ZigZagConfig::new(3.0, 1.0, 250).unwrap();
let mut state = ZigZagState::new(config);

let bar = BarInput {
    index: 0, timestamp_us: 1_000_000,
    high: 5_012_500_000_000, low: 5_000_000_000_000,
    close: 5_006_000_000_000, duration_us: Some(60_000_000),
};
let output = state.process_bar(&bar);

if let Some(pivot) = output.newly_confirmed {
    println!("Confirmed {} at price {}", pivot.kind, pivot.price);
}
```

## Features

- **No repainting**: Once confirmed, pivots never change price or index
- **Streaming**: Processes one bar at a time with O(1) state
- **Range-bar native**: Threshold scales naturally with bar width
- **Classification**: Automatic EL/HL/LL base class assignment per segment
- **Optional serde**: `cargo add qta --features serde`

## License

MIT
