[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"indicator-sma-en":3},"# Simple Moving Average (SMA)\n\n> StratCraft indicator page for SMA.\n\n**Route**: `\u002Findicators\u002Fsma\u002F`\n\n## What It Does\n\nSMA is the simplest moving average. It smooths price by averaging the last `n` observations equally.\n\n## Formula\n\n`SMA = (P1 + P2 + ... + Pn) \u002F n`\n\n## Parameters\n\n- `period` - default `30`\n\n## C++23 API\n\n```cpp\n#include \u003Cnonabt\u002Findicators\u002Fsma.hpp>\nauto sma = std::make_unique\u003Cnonabt::SMA>(data().close(), 30);\n```\n\n## Common Usage\n\n- Use SMA as a baseline trend line.\n- Use SMA crossovers for simple trend systems.\n- Use SMA as the center line for channel indicators.\n\n## Practical Pattern\n\nSMA is slower than EMA but often cleaner for longer-horizon trend confirmation.\n"]