StratCraft

相对强弱指数 (RSI)

经典动量振荡器的 QuantNexus 指标页面。

Route: /quantnexus/indicators/rsi/

作用

RSI 在可配置的回看窗口内衡量近期涨幅和跌幅之间的平衡。

公式

RSI = 100 - [100 / (1 + RS)],其中 RS = 平均涨幅 / 平均跌幅

参数

  • period - 默认 14
  • movav - 默认 SmoothedMovingAverage
  • upperband - 默认 70
  • lowerband - 默认 30
  • safediv - 默认 False
  • safehigh - 默认 100
  • safelow - 默认 50
  • lookback - 默认 1

C++23 API

#include <nonabt/indicators/rsi.hpp>
auto rsi = std::make_unique<nonabt::RSI>(data().close(), 14, "SmoothedMovingAverage", 70.0, 30.0, "False", 100.0, 50.0, 1);

常见用法

  • 用于发现超买和超卖情况。
  • 与趋势过滤器结合使用,避免逆市操作。
  • 在多信号系统中用作基准动量振荡器。