Exponential Moving Average (EMA)
StratCraft indicator page for EMA.
Route: /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- default30
C++23 API
#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.
