Skip to content
All library documents

Tick-Based Stochastic Histogram from the Difference Between K and D

Article MQL5 code base

Summary

This indicator modifies the stochastic oscillator by displaying the difference between its smoothed %K and %D lines as a histogram. The calculation first derives fast %K from the applied price's position within the recent high–low range, then applies a configurable moving average for %K and another for %D. The histogram is the resulting K value minus D.

Its inputs let a user set the lookback periods, slowing, moving-average methods, applied price, overbought and oversold levels, and whether to show the individual K and D lines. The description explains how the indicator is constructed, but it does not provide entry or exit rules, tested market examples, or performance evidence. As with other oscillator transformations, interpretation and usefulness depend on chosen parameters and market context.

Key ideas

  • The histogram represents the difference between smoothed stochastic %K and %D.
  • Fast %K measures the applied price's location within the high–low range over the selected period.
  • Separate moving-average settings control the smoothing of the K and D lines.
  • Overbought and oversold levels and line visibility are configurable inputs.
  • The description provides no trading rules or empirical performance results.

Tags

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