Weighted Moving Average (WMA)
StratCraft indicator page for WMA.
Route: /indicators/wma/
What It Does
WMA assigns more weight to newer prices than older prices. It sits between SMA and EMA in responsiveness and is widely used in trend systems.
Formula
WMA = (n*P1 + (n-1)*P2 + ... + 1*Pn) / (n*(n+1)/2)
Parameters
period- default30
C++23 API
#include <nonabt/indicators/wma.hpp>
auto wma = std::make_unique<nonabt::WMA>(data().close(), 30);
Common Usage
- Use WMA as a smoother trend line.
- Use it for weighted crossover systems.
- Combine it with other averages for lag reduction.
Practical Pattern
WMA is often used when you want a moving average that reacts faster than SMA without moving all the way to EMA behavior.
