The basic premise for the stochastic indicator is that the market tends to close higher in its range during a bull market, up move and lower during a bear market, down move. 

The indicator is made up of two lines, generally posted below the bar chart. These lines are referred to as %K and %D lines and are calculated as shown below.

%K = (current price - Low n) / (High n - Low n) 
- where n is the period, the number of bars in the sample, 14 is often the default

%D = (%K x + %K x-1 + %K x-2) / 3 
- which is simply a three period moving average of %K
- where x is the current period 

There are two types of stochastic, the fast stochastic indicator (calculations shown above) and the slow stochastic. The fast stochastic is extremely sensitive to price, while the slow stochastic is merely the result of smoothing the fast stochastic, using a moving average calculation. 

Therefore the fast stochastic %K line is actually the %D line from the slow stochastic and the new %D line is a smoothed moving average of the faster stochastic, %D line. A three period moving average is most common.

The indicator is bound by the parameters of 0 and 100. Most charting packages will place a horizontal line at 20 and 80, which may reflect an oversold or overbought condition, respectively. Some packages will allow a little more and place these indicator lines at 25 and 75. It can be dangerous to use these indicator lines solely, as a trading signal, without more information to support it.

How to use this indicator

There are several ways one can use this indicator.

  1. As a simple overbought / oversold oscillating index. In which case, a sell signal is generated when the stochastic rises above the 80 level and a buy signal generated when the indicator falls below 20.
  2. Stochastic cross - when the fast moving line %K crosses above the slower moving %D line a buy signal is generated. There is even more credence to this signal if it occurs below the 20 level. Conversely when the fast moving line %K falls below the slow moving line %D, a sell signal is generated. Again this is a much better signal if it occurs above the 80 line.
  3. Divergence - when price rises to new highs and the indicator fails to make new highs the market is said to be diverging. This produces a sell signal. Conversely if the market makes new lows in price, but the indicator fails to make a new low, then a buy signal may be generated.

The strongest signal occurs when we have all three patterns converging. That is when the stochastic crosses in the buy or sell zone above or below 80 or 20 respectively and we have divergence.

Something that should be pointed out is that a market that is topping will be closing at the upper extreme of the range and a market that is at a bottom will probably be closing at its lower extreme. This situation could exists for some time, which gives rise to a condition known as stochastic crawl an example of which can be seen in the chart example below. 

In the example below the stochastic indicator first pushed above the 80 line in early March when price was trading around 9450. This condition remained while price moved higher to 9470. It wasn't until they finally crossed with a smidgen of divergence that the signal became valid and price fell away accordingly.

Stochastic chart

© Copyright 2003 CQG, Inc. All rights reserved worldwide

© The MacLean Group Pty Ltd ACN 096 967 038. All rights reserved 2003. This article has been prepared by The MacLean Group and licensed to ASX. The views are those of the author and not of ASX. This material is educational and it is not intended to constitute financial advice.