StratCraft

移动平均线基础 (MA)

基础移动平均线的 QuantNexus 指标页面。

Route: /quantnexus/indicators/ma/

作用

MA 是目录中的基础移动平均线项目。在此数据集中,它也别名为 SMA 和 SimpleMovingAverage(简单移动平均线)。

公式

MA = average(n 周期内的价格)

参数

  • period - 默认 30

C++23 API

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

常见用法

  • 将 MA 用作趋势方向的基准。
  • 结合快线和慢线 MA 用于交叉系统。
  • 当你需要一个通用的移动平均线项目时,将其用作更简洁的参考线。