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);

常見用法

  • 用於發現超買和超賣情況。
  • 與趨勢過濾器結合使用,避免逆市操作。
  • 在多信號系統中用作基準動量振盪器。