Stochastic Oscillator Calculator
Calculate raw %K, simply slowed %K and a simple %D line from ordered user-entered high, low and close bars.
Enter ordered high-low-close bars
Use one consistent symbol, timeframe and broker feed. Every close must fall inside its entered bar range.
One row per line: high, low, close, with an optional label first. Commas, semicolons or tabs are accepted.
Entered-series Stochastic arithmetic
Entered Oscillators 1.0.0.
| Label | High | Low | Close | Raw %K | Slowed %K | %D |
|---|
How the entered Stochastic is calculated
Slowed %K = SMA of raw %K
%D = SMA of slowed %K
The K-period range uses entered lows and highs. The current entered close is positioned inside that range and then smoothed with the selected simple averages.
This version fixes the price field to low/high and both smoothing steps to SMA. A completed zero-range window fails closed rather than dividing by zero.
Worked example from the audited fixture
How to interpret the result
Raw K locates the latest close within the entered rolling range, while slow K and D add two separate simple-average stages. The displayed values do not establish overbought, oversold, crossover or reversal conditions.
Assumptions and limits
- Every bar must satisfy high at least low and close inside the inclusive high-low range.
- All bars must use one symbol, timeframe and broker feed.
- Labels are descriptive; the page does not parse dates, sort bars or repair gaps.
- Close/close mode and exponential, smoothed or weighted %D methods are not supported in this version.
- Values near 0 or 100 are not classified as oversold, overbought or trade signals.
Frequently asked questions
- Enter ordered high, low and close bars from one consistent symbol, timeframe and broker feed.
- The current close minus the lowest low is divided by the highest high minus the lowest low across the selected K-period window, then multiplied by 100.
- It is a simple moving average of raw percent K over the selected slowing period.
- It is a simple moving average of the available slowed percent K values over the selected D period.
- Version 1.0.0 fixes the range to entered lows and highs; close-close mode is not supported.
- Both slowing and percent D use simple moving averages; exponential, smoothed and weighted methods are outside this version.
- The calculation fails closed because raw percent K would otherwise require division by zero.
- No. The page does not classify thresholds, crosses, divergence, entries, exits or future direction.
Sources and methodology
- MetaTrader 5 Help — Stochastic Oscillator — Official low/high %K formula, slowing variables and simple %D formula.
- MQL5 Reference — iStochastic — Official K, D, slowing, averaging-method and price-field interface.
- MetaQuotes Code Base — Stochastic Oscillator — MetaQuotes-published formula and implementation context.
Continue entered-indicator analysis
Compare the chart feed and trading terms
Use one consistent broker feed for every entered observation and verify the symbol's price precision, spread and trading conditions before using any measurement in a plan.
Risk and affiliate disclosure: Leveraged forex and CFD trading can result in substantial losses. These are affiliate links, so ForexMT4Indicators.com may receive compensation if you register or trade through them, at no additional cost to you. Availability and terms vary by jurisdiction and broker entity.

