This blog tells us how to calculate and plot the Stochastic Oscillator. We also understand the difference between the Slow, fast and Full Stochastic Oscillator along with the advantages as well as disadvantages of Stochastic Oscillator. We will also see how they can be used to strengthen your trading skills and help you create a formidable strategy.

We will cover the following topics in this article:

- Why is Stochastic Oscillator used?
- Example to understand Stochastic Oscillator
- Calculating stochastic oscillator
- Stochastic oscillator indicator strategies
- What is fast or slow stochastic oscillator?
- Difference between Stochastic and RSI
- Limitations of Stochastic oscillator
- Conclusion

**Stochastic Oscillator definition**

Stochastic Oscillator is a momentum indicator which compares the recent closing price of an asset to a range of its prices over a specific period of time. While the stochastic oscillator is supposed to be similar to RSI, another technical indicator, we will see later on in the article how both indicators are different.

**Why is Stochastic Oscillator used?**

In the words of Dr George Lane, who helped create the Stochastic oscillator, it is an indicator which does not follow price or volume but signifies the speed, or momentum of a price. In this manner, it helps us predict a change in the direction of the price.

Thus, stochastic oscillator has become a well-known indicator among traders to identify a bullish or bearish trend in the market.

We will now understand how to plot the stochastic oscillator with the help of an example.

**Example to understand Stochastic Oscillator**

The stochastic oscillator consists of two lines, %K and % D.

The story goes that in the 1950s, while George Lane and his colleagues were trying to plot different oscillators by hand, they would run out of chart paper due to the range of values. Thus they tried to express them as percentages.

After trial and error, with each formula expressed as an alphabet, they finally managed to create a stable indicator with %K.

We will look into %K in more detail now.

**Formula for calculating %K**

The %K can be expressed as,

**Calculating Stochastic Oscillator - Live Market Example**

The accepted range is usually 14 days. We will calculate %K by using the information on the stock of Apple in the month of April-May 17.

Thus, the table would be as follows,

**Explaining the market example**

To explain this, let’s take the example of %K for the row with date 4 May 2017.

- To select the Highest high of selected price (1), we check the dates from 17 April to 4 May of the column, “High”, which is 148.089996
- For Lowest Low of selected price (2), the value is 140.449997
- To calculate the %K, the formula is,

__ [(Current closing price) - (lowest low price in selected range)] __ * 100

[highest high price in selected range) - (lowest low price in selected range)]

= [146.529999 - 140.449997] / [148.089996 - 140.449997] * 100

= (6.080002 / 7.639999) * 100

= 0.7958118 *100 **=79.58118%**

Similarly, we fill in the rest of the fields as well.

4. %D is simply the 3-day simple moving average (SMA) of the %K.

Thus, the table will be updated as follows,

**Graph of the outcome using Stochastic Oscillator**

A graph of the Stochastic oscillator with respect to the closing price will be shown as follows:

**Stochastic Oscillator Indicator Strategies**

The Stochastic oscillator indicator is used in the following manner:

**Overbought and Oversold signals**

The Stochastic oscillator Indicator is usually used to generate overbought or oversold signals. In this regard, both %K and %D play a vital role.

You can see in the above image the %K and %D lines touch the overbought level and on 9 June they turned downward, with the price following soon after.

**Divergence indicator (Bulls and Bears)**

We have seen this strategy in the previous indicator series, and the Stochastic oscillator can also be used to detect a swing in the market or rather, a change in the trend of the market.

In the graph above, you can see that in the last week of August, the Stochastic oscillator started declining and following this, the price, from 1 September and barring a short-lived uptrend, kept declining till the end of September.

**Crossover strategy**

There are two types of signals in this strategy:

- In the overbought region, the %K line crosses below the %D line signifying a sell signal
- In the oversold region, the %K line crosses above the %D line signifying a buy signal

**Downtrend:** You can see that in the graph above, the %K line starts declining and crosses the %D line in the overbought region on 15th May, which constitutes a sell signal. You can clearly see the downtrend later.

**Price Increase:** Also, the %K line starts increasing and crosses the %D line in the oversold region on 19th June, constituting a buy signal. You can clearly see the price increase later.

These were some strategies which can be used with the help of the Stochastic indicator. While the stochastic oscillator was a good indicator to identify overbought or oversold levels, the market found it was haphazard, or sloppy to make the readings more meaningful. Thus, another type of Stochastic oscillator was born. We will cover this in the next section.

**What is a fast Stochastic oscillator? And what is a slow Stochastic oscillator?**

The reason we use two lines is that we can use the crossover of the two lines as a signal, more specifically, the %D line can be called the signal line.

To emphasize the importance of the %D line, the stochastic oscillator was modified into two types:

- Fast Stochastic Oscillator, and
- Slow Stochastic Oscillator

**Calculating the fast stochastic oscillator**

The indicator which we calculated is considered as the **fast stochastic oscillator**.

**Calculating the slow stochastic oscillator**

To calculate the slow stochastic, we find the 3-day SMA of the %K (essentially the same as the earlier %D).

The %D becomes the 3-day SMA of the new slow stochastic oscillator.

This helps us in another form, as the original stochastic oscillator was said to be very choppy and thus the slow stochastic oscillator serves to smoothen the movements.

**Calculating the full stochastic oscillator**

Another version, known as the Full stochastic, is the type when we modify the period of %K as well as the number of days to take into account while calculating the full stochastic oscillator. Let’s consider the time period for calculating %K of the Full stochastic oscillator as 10 and the %D is the 5 day SMA of full %K.

**Comparing fast, slow and full stochastic oscillators**

Thus the three types of stochastic oscillators would be as follows:

**Difference between Stochastic Oscillator Indicator and RSI Indicator**

The Relative strength index (RSI) indicator and the Stochastic oscillator are both momentum oscillators and are used to measure the momentum of the price movement, but they are fundamentally different.

While RSI is used to detect the velocity of the market trend, the stochastic oscillator is built on the premise that the closing price should close in the same direction as the general trend.

Interestingly, in spite of the difference, it was found that combining them together actually made sense and thus, the **Stochastic RSI (stochRSI) indicator** was created. We will talk about this in the next blog.

**Limitation of Stochastic Oscillators**

As with other indicators, the Stochastic Oscillator also suffers from the problem of false signals.

The stochastic oscillator is usually used in a market where the prices swing regularly and thus, it can give a false signal if the price is in a long term trending position.

**Conclusion**

In summary, we have gone through the definitions as well as the calculation of different types of Stochastic indicators. We also saw a few strategies which can be used with the help of these indicators.

Technical indicators do help us in understanding the market better and make informed trades. You can learn more about indicators as well as their applications in the following learning track: Algorithmic Trading for Everyone