Skip to content
All library documents

Fast Stochastic Oscillator: K and D Line Calculation

Article MQL5 code base

Summary

The document describes a Fast Stochastic oscillator with a K line based on the current close's position within a recent high-low range. It defines that range using the highest and lowest prices over a lookback period, then smooths the K value with a simple moving average to produce the D line. If the range has zero width, the K value is assigned a neutral midpoint.

The indicator exposes K and D periods alongside overbought and oversold levels. These inputs configure the calculation and reference thresholds, but the document does not specify threshold values, signal rules, or how to trade crossings. It provides no backtest or performance evidence, and the notation for selecting the lookback high and low is not fully detailed. Treat it as a brief calculation description rather than a validated strategy.

Key ideas

  • The K line expresses the close's location within a recent high-low range as a percentage.
  • The D line smooths the K line with a simple moving average.
  • A zero-width range is handled by assigning the K line a midpoint value.
  • K period, D period, and overbought and oversold levels are configurable inputs.
  • No entry rules or performance evidence are supplied.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.