# Exponential Moving Average (EMA)

> QuantNexus indicator page for EMA.

**Route**: `/quantnexus/indicators/ema/`

## What It Does

EMA is a weighted moving average that gives more importance to recent prices. It reacts faster than an SMA and is a standard trend baseline.

## Formula

`EMA = [Price(t) * k] + [EMA(y) * (1 - k)]`, where `k = 2 / (n + 1)`

## Parameters

- `period` - default `30`

## C++23 API

```cpp
#include <nonabt/indicators/ema.hpp>
auto ema = std::make_unique<nonabt::EMA>(data().close(), 30);
```

## Common Usage

- Use EMA as a trend baseline.
- Use EMA crossovers for entries and exits.
- Pair EMA with price confirmation or another moving average.

## Practical Pattern

Buy when price closes above the EMA in an uptrend and exit when price loses the line.
