# 简单移动平均振荡器 (SMA Oscillator)

> 价格偏离 SMA 的 StratCraft 指标页面。

**Route**: `/quantnexus/indicators/movingaveragesimpleosc/`

## 作用

MOVINGAVERAGESIMPLEOSC 衡量价格偏离简单移动平均线（SMA）的程度。

## 公式

`振荡器 = 价格 - SMA(period)`

## 参数

- `period` - 默认 `30`

## C++23 API

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

## 常见用法

- 使用零轴来判断价格相对于基准线的扩张程度。
- 将其与趋势方向或更高时间框架的过滤器配合使用。
- 对均值回归和回调设置非常有用。
