Stochastic Oscillator Explained: Settings, Signals and Strategy
What is the stochastic oscillator?
The stochastic oscillator is a momentum indicator that shows where the latest close sits inside the recent high-low range, on a scale from 0 to 100. Near 100 means price closed near the top of that range; near 0 means near the bottom. Traders use it to time entries and spot fading momentum.
It was developed by George Lane in the 1950s. His idea was simple: in an uptrend, prices tend to close near the top of their recent range, and in a downtrend near the bottom. When closes slip away from that edge, momentum (the speed of the move) is fading, and momentum often changes before price does.
How is the stochastic oscillator calculated?
The indicator draws two lines in a panel below your chart:
- %K = (close − lowest low) ÷ (highest high − lowest low) × 100. The lowest low and highest high are taken over the last N periods, usually 14. A period is one candle.
- %D = a simple moving average of %K, usually over 3 periods. It is the slower “signal” line.
Suppose that over the last 14 candles EUR/USD made a highest high of 1.1050 and a lowest low of 1.0950, and the latest candle closed at 1.1030.
- Close − lowest low = 1.1030 − 1.0950 = 0.0080, or 80 pips (a pip is the smallest standard price step, 0.0001 here).
- Highest high − lowest low = 0.0100, or 100 pips.
- %K = 0.0080 ÷ 0.0100 × 100 = 80.
Price closed 80% of the way up its 14-candle range. If the two %K readings before that were 70 and 60, then %D = (80 + 70 + 60) ÷ 3 = 70. The result is always a percentage, so it never leaves the 0 to 100 scale and you can compare readings across any pair or timeframe.
Fast, slow and full stochastic: what is the difference?
The raw %K line is jumpy, so most platforms smooth it. Three versions exist:
- Fast stochastic: the raw %K from the formula above, plus %D as its 3-period average. Quick but noisy.
- Slow stochastic: the fast %D becomes the new, smoother %K, and a 3-period average of that becomes the new %D. This is what most traders mean by “stochastic”.
- Full stochastic: the same idea, but you choose all three numbers: the lookback, the smoothing of %K and the smoothing of %D.
That is why settings come as three numbers. A full stochastic at 14,3,3 is simply a slow stochastic. The order of the numbers differs between platforms, so read the labels in the settings box.
What are the best stochastic settings?
There is no best setting, only a trade-off between speed and noise. Two defaults are common:
- 14,3,3: the classic setting in most textbooks and charting packages.
- 5,3,3: the default in MetaTrader 4 and MetaTrader 5, shown as %K period 5, %D period 3, slowing 3. It looks back only five candles, so it reacts fast and reaches the extremes often.
A short lookback gives more signals and more false ones; a long one gives fewer, later signals. If the MetaTrader default feels too twitchy, change 5 to 14 before you judge the indicator, then keep it fixed while you test. Changing settings until last month’s chart looks perfect is called curve fitting, and it rarely survives new data.
What do the 80 and 20 levels mean?
Readings above 80 are called overbought, and readings below 20 are called oversold. The names mislead. Above 80 only means that price is closing in the top fifth of its recent range, which is exactly what a healthy uptrend does. “Overbought” does not mean “sell”, and “oversold” does not mean “buy”.
In a strong trend the stochastic can stay above 80 or below 20 for a long time. A trader who sells every touch of 80 in an uptrend gets stopped out repeatedly. The zones are information, not orders.
How to use the stochastic oscillator: three signals
- The %K/%D cross: %K crossing above %D says short-term momentum is turning up; crossing below says it is turning down. Crosses in mid-scale are constant and mean little. Those below 20 or above 80 carry more weight.
- Leaving the extreme zone: do not act when the lines enter a zone; wait for them to leave it. A move back above 20 says sellers have lost control of the range. A move back below 80 says buyers have.
- Divergence: price makes a lower low but the stochastic makes a higher low (bullish), or price makes a higher high while the stochastic makes a lower high (bearish). It warns that the push is weakening, but it does not time the turn. More in divergence trading.
All three are stronger at a level that already matters, such as a marked zone of support or resistance.
How to use stochastic with the trend
The most useful filter is the simplest: only take signals that agree with the bigger trend. In an uptrend, ignore overbought readings and wait for oversold ones. A dip below 20 inside an uptrend is a pullback (a short move against the trend), which is where trend traders want to buy. In a downtrend, do the reverse and sell only when the lines turn down from above 80.
The stochastic cannot define the trend, so use a separate tool. A common choice is a 200-period moving average: price above it, buys only; price below it, sells only. Another is to read the trend from a higher timeframe, as explained in multi-timeframe analysis.
Stochastic vs RSI: which is better?
Both are momentum oscillators running from 0 to 100, but they ask different questions. The RSI indicator compares the size of recent up-closes with recent down-closes. The stochastic compares the latest close with the recent high-low range.
- Speed: the stochastic moves faster and reaches its extremes more often. RSI is smoother and gives fewer signals.
- Levels and lines: the stochastic uses 80 and 20 and has two lines, so it offers a cross signal. RSI uses 70 and 30 and has one line.
- Best at: the stochastic suits ranges and pullback timing. RSI is often easier for judging the strength of a trend.
Neither is better. They are built from the same prices, so putting both on one chart gives you the same opinion twice. Pick one. Our guide to the best forex indicators explains how to choose one tool per job.
Weaknesses of the stochastic indicator
- It stays pinned in trends. Counter-trend signals keep failing until the trend itself ends.
- It whipsaws. A whipsaw is a signal that reverses almost at once. In choppy markets the lines cross back and forth, and each cross can cost a small loss.
- One spike distorts it. A single news candle sets a new high or low, and that value stays in the calculation until it leaves the lookback window.
A simple stochastic strategy to test
A rule set to try on a demo account, not a promise:
- Chart: 4-hour, slow stochastic 14,3,3, plus a 200-period moving average. Buys only while price is above the average; sells only below it.
- Trigger (buy): both lines drop below 20, then %K crosses above %D and the candle closes with both lines back above 20. Reverse everything for sells.
- Stop-loss: this order closes a losing trade. Place it below the lowest low of the pullback, or 1.5 × the ATR away if that is wider.
- Target: twice the stop distance.
- Risk: 1% of the account per trade. On a $1,000 account that is $10. With a 50-pip stop you can afford $10 ÷ 50 = $0.20 per pip, which is 0.02 lots on EUR/USD (a standard lot is 100,000 units). The position size calculator does this for any pair.
Record at least 100 trades, as described in backtesting and journalling. The indicator is free on every standard platform, so never pay for one. If you are still choosing where to trade, see our independent broker comparison.
The stochastic oscillator describes where price has closed within its recent range. It cannot tell you where price will go next, and it will give losing signals. Forex and CFDs carry a high risk of loss, and leverage, which lets a small deposit control a large position, makes losses arrive faster. Only risk money you can afford to lose.
FAQ
Is the stochastic oscillator a leading or lagging indicator?
It is usually classed as a leading indicator, because it can show momentum fading before price turns. But it is still calculated from past highs, lows and closes, so it cannot see ahead. It simply reacts faster than tools like moving averages. The price of that speed is more false signals, especially on short settings and in choppy markets.
What is the best timeframe for the stochastic oscillator?
It works the same way on every timeframe, because the formula only uses candles. Lower timeframes such as 5-minute charts give many more signals, but more of them are noise and the spread takes a bigger share of each trade. Many traders find the 1-hour, 4-hour and daily charts easier to trade, with the trend read from a higher timeframe.
Is the stochastic oscillator good for beginners?
Yes, as long as you learn its main trap first. It is simple to read and comes free on every platform. The common beginner mistake is selling every overbought reading and buying every oversold one, which fails badly in trends. Use it only in the direction of the bigger trend, practise on a demo account, and keep risk per trade small.
What is Stochastic RSI, and is it the same as the stochastic oscillator?
No. Stochastic RSI applies the stochastic formula to RSI values instead of to price, so it is an indicator of an indicator. It shows where the current RSI sits within its own recent range. It moves faster than either parent and hits its extremes more often, which means more signals and more false ones. Test it as a separate tool.