Stochastic RSI
The stochastic oscillator applied to RSI.
Inputs
| Name | Type | Default | Range |
|---|---|---|---|
| source | source | close | |
| rsi_period | int | 14 | 1 to 5000 |
| stoch_period | int | 14 | 1 to 5000 |
| k_smooth | int | 3 | 1 to 5000 |
| d_smooth | int | 3 | 1 to 5000 |
Outputs
| Name | Type | Required | Description |
|---|---|---|---|
| k | value | Optional | color theme.series_a, style line, width 1 |
| d | value | Optional | color 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