The stochastic oscillator is another wellknown momentum indicator used in technical analysis. The idea behind this indicator is that the closing prices should predominantly close in the same direction as the prevailing trend.
In an upward trend the price should be closing near the highs of the trading range and in a downward trend the price should be closing near the lows of the trading range. When this occurs it signals continued momentum and strength in the direction of the prevailing trend.
The stochastic oscillator is plotted within a range of zero and 100 and signals overbought conditions above 80 and oversold conditions below 20. The stochastic oscillator contains two lines. The first line is the %K which is essentially the raw measure used to formulate the idea of momentum behind the oscillator. The second line is the %D which is simply a moving average of the %K. The %D line is considered to be the more important of the two lines as it seen to produce better signals.
The stochastic oscillator generally uses the past 14 trading periods in the calculation but can be adjusted to meet the needs of the user.
Calculation of the Stochastic Oscillator
There are three versions of the stochastic oscillator: fast, slow and full. The purpose of each version of the stochastic is to smooth the oscillator and help remove some of the randomness. The fast stochastic oscillator is the basic version of the indicator and is the one represented by the above equations. The slow and full stochastics smooth the data that is provided by the raw data given in the fast stochastic. Both of these oscillators reflect the same period and plot two lines.
Slow Stochastic:
The number of periods used in calculating the slow %D can be adjusted to meet the user's needs. (For more, see: What is the difference between fast and slow stochastics in technical analysis?)
Full Stochastic:
Stochastic Signal Generation
The main signal that is formed by this oscillator is when the %K line crosses the %D line. A bullish signal is formed when the %K breaks through the %D in an upward direction. A bearish signal is formed when the %K falls through the %D in a downward direction. (For further reading, check out: Stochastics: An Accurate Buy And Sell Indicator)
Divergence can also be used to formulate buy–andsell signals. When looking for divergence the %D line is the one most used as it gives clearer signals due to its smoothed nature. A divergence signal is formed when the %D and the security move away from one another, signaling a weakening of the trend.
If the security is moving in an upward direction and the %D is moving in a downward direction this is a bearish sign. A bullish sign is formed when the %D is moving upward when the security is moving downward. If this divergence is happening when the %D is in an overbought (above 80) or an oversold (below 20) position on the oscillator the signal formed is much stronger. However, the signal is not considered complete until the %K line crosses the %D line in the opposite direction of the price trend.
The stochastic oscillator is a little more difficult to calculate compared to other technical indicators, but none the less it is one of the more commonly used indicators. The indicator can be adjusted to any time frame but is normally set to equal 14 periods and is commonly paired with other indicators such as the MACD in order to increase the probability of identifying a winning trade. (For related reading, see: MACD and Stochastic: A DoubleCross Strategy)
Exploring Oscillators and Indicators: Market Indicators

Trading
Best technical indicators to pair with the stochastic oscillator
Learn how the stochastic oscillator indicator is sensitive to price, and discover technical indicators traders use to complement it such as the RSI and MACD. 
Trading
Know the Forces at Play Behind the Buy/Sell Cycles
Weekly stochastics uncover patterns of buying and selling that can be predicted and capitalized on. 
Trading
MACD And Stochastic: A DoubleCross Strategy
The stochastic oscillator and the moving average convergence divergence (MACD) are two indicators that work well together. 
Trading
MACD and Stochastic: A DoubleCross Strategy
Two indicators are usually better than one. Find out how pairing the stochastic and MACD can enhance your trading, and reveal entry points. 
Investing
The top technical indicators for commodity investing
Learn how traders can use "the usual suspects" standard for trend trading when it comes to choosing indicators for commodities investing. 
Trading
Percentage Price Oscillator – An 'Elegant Indicator'
The percentage price oscillator, which measures momentum, is among the more sophisticated tools in the technical analysis arsenal. 
Trading
Three Stocks Headed Into Longterm Buy Cycles
These beatendown S&P 500 components are finishing up longterm sell cycles that should yield strong multimonth bounces.