Stochastic RSI

stoch_rsioscillatorsForge API 1

The stochastic oscillator applied to RSI.

Inputs

NameTypeDefaultRange
sourcesourceclose
rsi_periodint141 to 5000
stoch_periodint141 to 5000
k_smoothint31 to 5000
d_smoothint31 to 5000

Outputs

NameTypeRequiredDescription
kvalueOptionalcolor theme.series_a, style line, width 1
dvalueOptionalcolor theme.series_b, dash dash, style line, width 1
Warm-up
rsi_period + stoch_period + k_smooth + d_smooth - 3 bars (31 at the defaults)
Repaints
No
Parity
None

Formula

RSI is Wilder's relative strength index over rsi_period

raw = 100 * (RSI - lowest RSI) / (highest RSI - lowest RSI) over stoch_period; RSI itself when its range is 0

%K = the simple average of raw over k_smooth, %D = the simple average of %K over d_smooth