The stochastics oscillator is a leading indicator that expresses overbought and oversold conditions by oscillating in the indicator window.

The vertical scale in the indicator window ranges from 0 to 100 points, and over 80 means overbought and below 20 oversold conditions.

In the indicator properties, you can add levels for further assistance.

**In this article, I explain how to set up, how calculate and how to trade the stochastics indicator.**

Read more: Commodity Channel Index (CCI): Calculation and Trading Strategy

## Stochastic Oscillator Settings in MT4 and MT5

To insert a stochastic oscillator in MT4 and MT5 go to Insert>Indicators>Oscillators and click on Stochastic Oscillator.

If you have already inserted it, right-click on the indicator line in the indicator window and click on stochastic properties.

The setting window of this indicator has four tabs, parameters, levels, color (MT4) and scale (MT5), and visualization.

**Parameters tab:**

- %K is the fast line;
- Slowing smooth the %K;
- %D line is the signal line or smoother one;
- The Method is to choose the type of moving average;
- The Main color is to select the color of %K; and
- Signal Color is to select the color of %D.

**Levels tab:**

- You can add or delete a horizontal line in the indicator window; and
- Give it color and style.

**Scale tab (MT4 does not have):**

- Inherit scale copy the settings of the previous indicator;
- Scale by line allows to scale it either by a percentage of points; and
- Fixed minimum and fixed maximum select the highest and lowest value for the indicator window. This option in MT4 is in the parameters tab.

**In the visualization tab, you can select the timeframe that you want to see the stochastic oscillator.**

Read more: Bollinger Bands Indicator: Strategy, Calculation & Examples

## Calculation of Stochastics Oscillator

This indicator consists of two lines, %K and %D. In this indicator, %K is more sensitive than %D.

### Calculation of the %K Line in Stochastics Oscillator

The formula of %K line is the following:

**%K = 100 [(CCP – LP) / (HP – LP)]**

Where;

- 100: to calculate in percentage term
- CCP: Current Closing Price
- LP: Lowest price in a Period
- HP: Highest price in a Period

The above formula calculates, on a percentage basis, from 0 to 100, the last candlestick closing price, about a range of a selected period.

The %K line alone is extremely sensitive and provides less value in usage of it. To provide more reliable signals, the moving average of %K is constructed.

In the properties of the stochastic oscillator setting, you can put your favorite number to slow the %K. A large slowing number means a more smoothened %K line. For example, if you select 3, the %K line will be averaged by three in the indicator window. Most of the traders prefer to slow the %K by number three.

### Calculation of the %D Line in Stochastics

The second line, %D, the smoothed line, is a moving average of the %K line produced by the above formula and slowing number.

Read more: What is the Relative Strength Index (RSI) & How to Trade It?

## How to trade the Stochastics Oscillator?

Stochastic oscillator helps you become a better trader or investor if you set them appropriately. In the settings or properties of the stochastic, you can select a number for %K, Slowing number, and %D.

### Setting Proper %K and %D Lines

If you do not slow the %K line, it is volatile and makes too many false signals. It is better to smooth the %K by averaging the movement of results produced by the calculation formula of %K. The period you select in the calculation of %K also affects the smoothness of both %K and %D lines.

Moreover, a higher number of %D means less volatile and vice versa. A lower %D value generates less reliability, and a higher value will generate more reliable signals. Based on the financial asset you trade, and the market’s volatility, you need to select a proper number for %D. If you choose a high, you may miss opportunities, and if you choose a short number, you may get too many signals, which will result in huge losses.

Long-term traders prefer to smooth %K more than the short-term trader. Based on your strategy, you must practice and find the best number that works for you.

The %D number needs a proper number to generate signals. When the %D line crosses the %K line, it means a signal is generated for placing a trade. Again, you have to practice and find the best that suits you.

In the above charts, the left one is the default settings. I doubled %K, Slowing %K, and %D which made the chart much smoother.

In my personal view, a smoother one is better. Because the strategy and personality of every trader vary, I suggest you go to your chart and play with it to find values that suit your strategy and personality.

### Converging and Diverging Provide Signals

Converging and Diverging from the price movement is another way stochastics generates trade signals.

Convergence and divergence mean that the stochastics and price do not go in the same direction.

Convergence occurs in a downtrend when the price is still falling but the stochastics indicator line starts moving upward. When you see a convergence you should be careful because the trend may change from downward to upward or correct itself.

Divergence occurs when the price is still rising but the stochastics indicator line change direction and starts falling. The divergence of this indicator from the price chart indicates a possible trend reversal or a correction.

In the above charts, the stochastic oscillator line starts moving against the price chart direction, providing a new direction signal. The first chart predicted an uptrend and the second one a downtrend. Both were right.

### Crossing 80 and 20 Levels Provide Warning

The stochastic oscillator changes directions quicker than most other indicators.

Crossing below level 20, and above level 80 warn traders that a correction or trend reversal may happen. Most of these crosses result in correction so, you should be only careful and not make trading decisions based on crossing these levels.

In the above chart, the stochastic oscillator line crosses the upper level 80, and lower lever 20 multiple times. It is an indication to pay attention to possible movements.

**Notice that crossing upper and lower levels in the indicator window is just for attention. And, you should not make your trading decisions solely based on this line.**

Read more: Momentum Indicator: Calculation and How to Trade

## Practice Stochastics Oscillator In Real Chart

Click on “f(x)>Momentum Indicators>Stochastics” and set as you wish to insert the Stochastics indicator.

## Bottom Line

Stochastics indicator line or any other indicator is just a tool that helps you make a better investment decision. You should not rely solely on this indicator.

It is always better to combine charts, candlesticks, and fundamental analysis. For example, you can see by studying charts that the %K and %D lines are above 80 or below 20, but the market continues in its current direction. You have to find if any news is behind or if something else pushes the price higher or pulls the price lower.