Stochastic RSI Calculation and Charting Example
Summary
This document provides a Stochastic RSI implementation intended to match an exchange's indicator. It first calculates a 14-period RSI, then normalizes RSI against its rolling 14-period low and high. The numerator and denominator are each smoothed with a 3-period moving average; the resulting K series is followed by a 3-period moving average to produce D. Initial or invalid values are filled with neutral-looking values for display.
The accompanying example retrieves hourly futures records and plots price alongside K and D in a repeatedly updated chart. It is primarily an indicator calculation and visualization example, not a complete trading strategy: it gives no entry or exit rules, market rationale, or performance evidence. The initialization and smoothing conventions can affect how closely its output matches other platforms, so users should verify values against their intended reference before using the indicator in research.
Key ideas
- The example calculates RSI over 14 periods, then normalizes it over a rolling 14-period range.
- It smooths the normalization components with 3-period moving averages and averages the K series to produce D.
- The code displays the oscillator with hourly futures price data in an updating chart.
- It specifies no trading rules or performance evidence, and platform conventions may affect indicator values.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.