Stochastic oscillator
A momentum oscillator that shows where the latest close sits within the recent high-low range, on a scale from 0 to 100.
What the stochastic oscillator is.
Two lines in a window below price that track where each close lands in the recent range.
The stochastic oscillator compares the latest close with the highest high and lowest low of recent bars. The answer is a percentage from 0 to 100.
A reading near 100 means price closed near the top of its recent range. A reading near 0 means it closed near the bottom.
It is a momentum oscillator: a line between fixed limits that shows whether closes have been landing high or low in the range. In a rising market, closes tend to land near the highs.
How it is calculated.
Four steps from the recent range. Your platform repeats them on every new bar.
Find the recent range.
Take the highest high and the lowest low of the last 14 bars. The gap between them is the range.
Place the close inside it.
Measure how far the latest close is above the lowest low, as a share of the range. That percentage is %K.
Smooth it.
The slow stochastic averages %K over 3 bars, which MT5 calls slowing. This takes out some of the jumps.
Add the signal line.
A 3-period average of the smoothed %K gives %D. It moves more slowly, and it is the line %K crosses.
Slow %K = 3-period average of %K
%D = 3-period average of slow %K
| Version | What changes |
|---|---|
| Fast | %K is used as it is, so the line is jumpy. |
| Slow | %K is smoothed over 3 bars before %D is taken. This is the usual default. |
| Full | You choose every setting: the range, the smoothing and the %D period. |
How to read it.
Four common readings. Each describes the recent range, not the next move.
Above 80 and below 20.
Above 80, price is closing near the top of its recent range. Below 20, near the bottom. In a range, these zones sometimes come before a turn.
%K and %D crossovers.
When %K crosses above %D, closes are moving higher within the range. A cross below shows them moving lower. Crosses inside the 80 or 20 zones draw the most attention.
Trends pin the line.
In a strong uptrend, each close can land near the top of the range. The stochastic can then stay above 80 while price keeps climbing.
Divergence.
Price makes a lower low while the stochastic makes a higher low, or the reverse at highs. It suggests momentum is changing, though price may not follow.
Common mistakes.
Where traders new to the stochastic oscillator most often go wrong.
Selling because the line is above 80. In a trend, the stochastic can stay there while price keeps rising.
Acting on every crossover. With fast settings the lines cross constantly, and many of those crosses mean little.
Assuming every chart uses the same settings. MT5 opens with 5, 3, 3, which reacts much faster than the 14, 3, 3 on this page.
Ignoring the bigger picture. A low reading in a falling market says something different from a low reading in a sideways range.
Using it on MetaTrader 5.
The stochastic oscillator is one of MT5’s built-in indicators, on desktop, web and mobile.
Open a chart.
In MetaTrader 5, open the instrument and timeframe you want to study.
Add the indicator.
Go to Insert, then Indicators, then Oscillators, and choose Stochastic Oscillator.
Check the settings.
The MT5 defaults are %K period 5, %D period 3 and Slowing 3. The chart on this page uses 14, 3, 3. Both are common.
Save it as a template.
Right-click the chart, choose Templates, then Save Template, so the same set-up opens on other charts.
Questions, answered.
What traders ask most about the stochastic oscillator.
01Who created the stochastic oscillator?
02Should I use 5, 3, 3 or 14, 3, 3?
03What is the difference between %K and %D?
04How is it different from the RSI?
05Can I practise with it first?
Practise it on a demo.
Add the stochastic oscillator to a chart on a free MT5 demo and watch how it moves before you trade with real money.
Trading CFDs on a live account puts your capital at risk and you can lose money. A demo does not.



