Skip to content
All library documents

Bar-Based Stochastic Indicator Calculation and Parameters

Article MQL5 code base

Summary

The document defines a modified stochastic indicator and lists its configurable inputs: the %K and %D periods, slowing, smoothing methods, and overbought and oversold levels. Its calculation first derives a fast %K value from the close’s position within the high-low range over the %K lookback. It then applies a moving average for the slowed K line and another moving average to obtain D.

This provides a concise indicator specification that can help a trader or developer understand what the settings control and how the output is formed. The text gives no trading rules for interpreting crossings or threshold readings, and it reports no backtest or evidence about predictive performance. Results may also depend on the chosen periods and averaging methods.

Key ideas

  • Fast %K measures the close relative to the highest high and lowest low in its lookback range.
  • The slowed K line applies a configurable moving average to fast %K.
  • The D line applies a second configurable moving average to the K line.
  • Overbought and oversold thresholds are configurable, but the document gives no entry or exit rules.

Tags

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