Reconstructing KDJ Values with Rolling Range and Smoothing
Summary
This short platform discussion presents a manual construction of the KDJ oscillator alongside built-in KDJ functions. It first derives the raw stochastic value from the close’s position within the rolling ten-period high-low range. It then applies smoothing to produce K and D, and derives J from those two lines. The accompanying expressions calculate corresponding platform outputs so a user can compare the manual series with the built-in values.
The material is useful as a calculation reference when investigating why indicator values differ across implementations. However, it does not explain the source of any discrepancy, report a comparison, or state the platform’s initialization and smoothing conventions. The displayed formulas also use a specific sequence of smoothing operations, which may not match other common KDJ definitions. Users should verify the platform’s parameter semantics and edge-case handling, including periods where the rolling range is zero, before treating the series as interchangeable.
Key ideas
- The raw stochastic value measures the close relative to the rolling high-low range.
- The example smooths the raw value to form K and smooths K again to form D.
- J is calculated as a transformation of K and D.
- Built-in and manually calculated KDJ series may differ because implementations can use different conventions.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.