The Stochastic oscillator is an indicator measuring overbought and oversold conditions in the market. One of the lines is faster than the other, just like in the case of MACD.
The Stochastic is based on the notion that in an uptrend, closing prices usually concentrate in the upper part of the period’s range. On the other hand, as prices start going down in a downtrend, closing prices are usually close to the lows of the period’s range. Divergence between the stochastic lines and the price action of the underlying forex instrument gives a signal for trading.
When the stochastic lines are above 80, then it means the market is overbought. If the stochastic lines are below 20, it means the market is oversold. Normally you would want to buy when the market is oversold, and sell when it’s overbought.