[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"indicator-movingaveragesimpleosc-zh":3},"# 简单移动平均振荡器 (SMA Oscillator)\n\n> 价格偏离 SMA 的 StratCraft 指标页面。\n\n**Route**: `\u002Findicators\u002Fmovingaveragesimpleosc\u002F`\n\n## 作用\n\nMOVINGAVERAGESIMPLEOSC 衡量价格偏离简单移动平均线（SMA）的程度。\n\n## 公式\n\n`振荡器 = 价格 - SMA(period)`\n\n## 参数\n\n- `period` - 默认 `30`\n\n## C++23 API\n\n```cpp\n#include \u003Cnonabt\u002Findicators\u002Fmovingaveragesimpleosc.hpp>\nauto smaOsc = std::make_unique\u003Cnonabt::MOVINGAVERAGESIMPLEOSC>(data().close(), 30);\n```\n\n## 常见用法\n\n- 使用零轴来判断价格相对于基准线的扩张程度。\n- 将其与趋势方向或更高时间框架的过滤器配合使用。\n- 对均值回归和回调设置非常有用。\n"]