Relative Strength Index (RSI)

StratCraft indicator page for the classic momentum oscillator.

Route: /indicators/rsi/

What It Does

RSI measures the balance between recent gains and losses over a configurable lookback window.

Formula

RSI = 100 - [100 / (1 + RS)], where RS = average gain / average loss

Parameters

  • period - default 14
  • movav - default SmoothedMovingAverage
  • upperband - default 70
  • lowerband - default 30
  • safediv - default False
  • safehigh - default 100
  • safelow - default 50
  • lookback - default 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);

Common Usage

  • Use it to spot overbought and oversold conditions.
  • Pair it with trend filters to avoid fighting strong moves.
  • Useful as a baseline momentum oscillator in multi-signal systems.