# Stochastic oscillator

*In this series of articles we will elaborate on the consideration of stock indicators - mathematical tools of technical analysis, which provide a more complete picture of future price movements at Forex currency market. Correct interpretation of indicator signals will help traders to be in the trend and make the most profit, but remember that this is only a description of the technical capabilities of the indicator, which requires adjustment on a case-by-case basis for the chosen trading strategy.*

*To date, developed a huge number of tools for technical analysis, in the following articles consider the most popular of them.*

### Stochastic Oscillator

Stochastic oscillator predicts a trend reversal with great accuracy, indicating the moments when the price reaches the "overbought" or "oversold" zones and comes close to the borders of the trading "corridor".

### Stochastic indicator calculation formula

The stochastic oscillator is set by two parameters: the fast curve %K and the slow curve %D. **Parameter %K** is calculated using the following formula:

*%K = (CLOSE - MIN (LOW (%K))) / (MAX (HIGH (%K)) - MIN (LOW (%K)) * 100*

Where:

- CLOSE - today's closing price;

- MIN (LOW (%K)) - is the smallest minimum for the number of periods %K;

- MAX (HIGH (%K)) - is the highest maximum for the number of periods %K.

The parameter %D is a moving average of %K and is calculated using the formula:

*%D = SMA (%K, N)*

Where:

- N is the smoothing period;

- SMA - simple moving average.

*SMA = SUM (CLOSE (i), N) / N*

Where:

- SUM - amount;

- CLOSE (i) - the closing price of the current period;

- N - number of calculation periods.

Thus, the oscillator analyzes the location of the closing price of the current candle or bar (depending on the type of chart) relative to the selected time period N.

**Variation range **stochastic oscillator on the chart - from 0% to 100%, the boundary value of 0% corresponds to the minimum price for a certain period N, and the value of 100% - the maximum closing price. Levels in 20% and 80% define overbought areas and "oversold.

### Interpretation of Stochastic trading signals

**Stochastic Oscillator Reaching Critical Values **indicates that the price change is rapid and a direction correction is expected in the near future.

If the line %K crosses %D from above, it forms a signal to sell the base currency. If the line %K crosses the line %D from below, it signals the opening of a long position on the pair. Note that buy signals are most reliable in the area from 0% to 20%, and sell signals - in the area from 80% to 100%.

A strong and reliable signal is **divergence** - divergence of the price chart and the oscillator chart. For example, when a new maximum is formed on the price chart and no maximum appears on the stochastic oscillator chart, such a situation is called a negative divergence and predicts a down-trend reversal. If the price decreases to a new low on the chart, but there is no such change on the oscillator chart, the situation is called a positive divergence, due to which a trend reversal is possible.

### Using the Stochastic indicator

The stochastic oscillator is usually used on the non-breaking section to trade on short and medium term time intervals. Figure 1 shows the action of the stochastic oscillator Stoch (8,3,3) on the hourly chart of the USDCHF pair and clearly shows the negative divergence.

Fig. 1. Stoch oscillator (8,3,3).

In this example, the parameter %K ("fast stochastic") uses a period of 8 candles, the parameter %D ("slow stochastic") - a period of 3 candles. **Your task is to** - Choose the most optimal parameters of the stochastic oscillator to work on the time intervals of your choice.