The Stochastic Oscillator compares the closing price of a security to its price range over a given time period. Its displayed by two lines, a main line called %K (drawn in solid blue) and a secondary line (in dotted green) called %D. The %D line is the moving average of the %K.
The Stochastic Oscillator contains four variables:
This is the number of time periods used in the stochastic calculation.
%K Slowing Periods:
This value controls the internal smoothing of %K. A value of 1 is considered a fast stochastic while a value of 3 is considered a slow stochastic.
This is the number of time periods used when calculating the moving average of %K.
The method (Exponential, Simple, Time Series, Triangular, Variable, or Weighted) used to calculate %D
When trading using the Stochastic Oscillator, one method is to buy when either %K or %D falls below 20 and then rises back above that level. Similarly, sell when the either line rises above 80 and then falls back below. Another pattern to look for when timing trades is buy when the %K line rises above the %D line or sell when the %K line falls below the %D line. Lastly, one should always be on the lookout for divergence. For example, if prices are making a series of new highs and the Stochastic Oscillator fails to surpass its previous highs, the indicator typically will provide the clue as to where prices will soon head.