[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"indicator-rsi-zh-tw":3},"# 相對強弱指數 (RSI)\n\n> 經典動量振盪器的 StratCraft 指標頁面。\n\n**Route**: `\u002Findicators\u002Frsi\u002F`\n\n## 作用\n\nRSI 在可配置的回看窗口內衡量近期漲幅和跌幅之間的平衡。\n\n## 公式\n\n`RSI = 100 - [100 \u002F (1 + RS)]`，其中 `RS = 平均漲幅 \u002F 平均跌幅`\n\n## 參數\n\n- `period` - 預設 `14`\n- `movav` - 預設 `SmoothedMovingAverage`\n- `upperband` - 預設 `70`\n- `lowerband` - 預設 `30`\n- `safediv` - 預設 `False`\n- `safehigh` - 預設 `100`\n- `safelow` - 預設 `50`\n- `lookback` - 預設 `1`\n\n## C++23 API\n\n```cpp\n#include \u003Cnonabt\u002Findicators\u002Frsi.hpp>\nauto rsi = std::make_unique\u003Cnonabt::RSI>(data().close(), 14, \"SmoothedMovingAverage\", 70.0, 30.0, \"False\", 100.0, 50.0, 1);\n```\n\n## 常見用法\n\n- 用於發現超買和超賣情況。\n- 與趨勢過濾器結合使用，避免逆市操作。\n- 在多信號系統中用作基準動量振盪器。\n"]