# 移動平均線基礎 (MA)

> 基礎移動平均線的 StratCraft 指標頁面。

**Route**: `/quantnexus/indicators/ma/`

## 作用

MA 是目錄中的基礎移動平均線項目。在此數據集中，它也別名為 SMA 和 SimpleMovingAverage（簡單移動平均線）。

## 公式

`MA = average(n 週期內的價格)`

## 參數

- `period` - 預設 `30`

## C++23 API

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

## 常見用法

- 將 MA 用作趨勢方向的基準。
- 結合快線和慢線 MA 用於交叉系統。
- 當你需要一個通用的移動平均線項目时，將其用作更簡潔的參考線。
