The Stochastic Oscillator was created by George C. Lane and introduced to the trading community in the late 1950s. It was one of the first technical indicators used by analysts to provide insight into potential future market direction and is based on the premise that during a market uptrend, prices will remain equal to or above the previous period closing price. Alternatively, in a market downtrend, prices will likely remain equal to or below the previous closing price.
Using
a scale to measure the degree of change between prices from one
closing period to the next, the Stochastic Oscillator attempts to
predict the probability for the continuation of the current direction
trend. Traders look for signals generated by the actions of the
stochastic lines as viewed on the stochastic scale.
The
Stochastic Oscillator consists of two lines  when both lines are
included on a price chart, it is referred to as the Full Stochastic.
The two lines are:
%K

tracks the current market rate.
%D
 "smoothes out" the %K line by calculating and plotting
the exchange rate as a moving average  this is also known as the
signal line.

%K = 100 x (Closing Price  Lowest Price of N Periods)/ (Highest Price of N Periods  Lowest Price of N Periods)
Note
that N is usually is set to 14 periods as this represents a large
enough sample of data to arrive at a meaningful calculation.
Most
systems allow you to modify the number of reporting periods but by
doing this, you could alter the effectiveness of the results.

%D = 3 Period Moving Average of %K
The
calculation to create the %D Stochastic uses the last three
valuations of %K to create a threeperiod moving average of the %K
Stochastic. The result is a "smoothedout" version of %K.
Because
%D is a moving average of %K, it is referred to as "Stochastic
Slow" as it reacts more slowly to market price changes than %K.
As you would expect, %K is also known as "Stochastic Fast".
( Below charts Blue line is %K, Red line is %D )
The
Stochastic Oscillator produces three types of signals:
Crossovers
Divergence
(strength of trend)
Overbought
/ Oversold designations
CROSSOVERS
A
crossover occurs when the %K line (the fast stochastic) intersects
the %D line (the slow stochastic).
Because
the %K line reacts more quickly to market changes, it oscillates at a
faster rate than the %D line. Under certain conditions, it can catch
up to, and cross over, the %D line.
When
the %K Stochastic crosses over and moves above the %D Stochastic, the
interpretation is that the market rate is gaining at a faster rate
than the average represented by the %D Stochastic. This increase in
price strength is considered a buy signal.
A
sell signal is the result of the %K Stochastic crossing under the %D
Stochastic. This is because the faster moving %K line is declining at
a faster rate than the overall, downward trend.
DIVERGENCE
Divergence
is simply the difference – or the gap – between the %K and %D
Stochastic lines.
Because
the %K line moves faster than the %D line, the divergence (the gap)
between the two stochastics increases as a trend gathers momentum.
However, the lines come closer together as momentum wanes in the
prelude to a rate reversal.
OVERBOUGHT
AND OVERSOLD DESIGNATIONS
When
the %K line falls below 20 on the Stochastic scale, the market may
now consider the currency pair to be oversold. As a result, traders
may start buying thereby lifting the price higher as the market
scoops up a "bargain".
Comment HereComment Here