---
title: "Stochastic Oscillator - Oscillators - Indicators - Charts - MetaTrader 5 for Android - MetaTrader 5 Android Help"
description: "The Stochastic Oscillator Technical Indicator compares where a securitys price closed relative to its price range over a... - Stochastic Oscillator - Oscillators - Indicators"
image: "https://www.metatrader5.com/i/logo_metatrader5.png"
url: "https://www.metatrader5.com/en/mobile-trading/android/help/chart/indicators/oscillators/stochastic_oscillator"
---

[MetaTrader 5 Android Help](https://www.metatrader5.com/en/mobile-trading/android/help) → [Charts](https://www.metatrader5.com/en/mobile-trading/android/help/chart) → [Indicators](https://www.metatrader5.com/en/mobile-trading/android/help/chart/indicators) → [Oscillators](https://www.metatrader5.com/en/mobile-trading/android/help/chart/indicators/oscillators) → Stochastic Oscillator

# Stochastic Oscillator

The Stochastic Oscillator Technical Indicator compares where a securitys price closed relative to its price range over a given time period. The Stochastic Oscillator is displayed as two lines. The main line is called %K. The second line called %D is a [Moving Average](https://www.metatrader5.com/en/mobile-trading/android/help/chart/indicators/trend_indicators/moving_average) of %K. The %K line is usually displayed as a solid line and the %D line is usually displayed as a dotted line. There are several ways to interpret a Stochastic Oscillator. Three popular methods include:

- Buy when the Oscillator (either %K or %D) falls below a specific level (for example, 20) and then rises above that level. Sell when the Oscillator rises above a specific level (for example, 80) and then falls below that level.
- Buy when the %K line rises above %D. Sell when %K falls below %D.
- Look for divergences. For instance: where prices are making a series of new highs and the Stochastic Oscillator is failing to surpass its previous highs.

![Stochastic Oscillator ](https://www.metatrader5.com/i/help/android/en/stochastic_oscillator.png)

## Calculation

Four variables are used for the calculation of the Stochastic Oscillator:

- %K periods. 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; a value of 3 is considered slow.
- %D periods. This is the number of time periods used when calculating a moving average of %K.
- %D method. The method (i.e., Exponential, Simple, Smoothed, or Weighted) that is used to calculate %D.

The formula for %K is:

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

Where:

CLOSE – todays closing price;
MIN (LOW (%K)) – the lowest low for the %K periods;
MAX (HIGH (%K)) – the highest high for the %K periods.

The %D moving average is calculated according to the formula:

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

Where:

N – smoothing period;
SMA – [Simple Moving Average](https://www.metatrader5.com/en/mobile-trading/android/help/chart/indicators/trend_indicators/moving_average#sma).

## In this section

- [Average True Range](https://www.metatrader5.com/en/mobile-trading/android/help/chart/indicators/oscillators/average_true_range)
- [Bears Power](https://www.metatrader5.com/en/mobile-trading/android/help/chart/indicators/oscillators/bears_power)
- [Bulls Power](https://www.metatrader5.com/en/mobile-trading/android/help/chart/indicators/oscillators/bulls_power)
- [Commodity Channel Index](https://www.metatrader5.com/en/mobile-trading/android/help/chart/indicators/oscillators/commodity_channel_index)
- [DeMarker](https://www.metatrader5.com/en/mobile-trading/android/help/chart/indicators/oscillators/demarker)
- [Force Index](https://www.metatrader5.com/en/mobile-trading/android/help/chart/indicators/oscillators/force_index)
- [MACD](https://www.metatrader5.com/en/mobile-trading/android/help/chart/indicators/oscillators/macd)
- [Momentum](https://www.metatrader5.com/en/mobile-trading/android/help/chart/indicators/oscillators/momentum)
- [Moving Average of Oscillator](https://www.metatrader5.com/en/mobile-trading/android/help/chart/indicators/oscillators/moving_average_oscillator)
- [Relative Strength Index](https://www.metatrader5.com/en/mobile-trading/android/help/chart/indicators/oscillators/relative_strength_index)
- [Relative Vigor Index](https://www.metatrader5.com/en/mobile-trading/android/help/chart/indicators/oscillators/relative_vigor_index)
- Stochastic Oscillator
- [Williams' Percent Range](https://www.metatrader5.com/en/mobile-trading/android/help/chart/indicators/oscillators/williams_percent_range)

```json
{"@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [ {"@type": "ListItem", "position": 1, "item": {"@id": "https://www.metatrader5.com/en/mobile-trading/android/help", "name": "MetaTrader 5 Android Help"}}, {"@type": "ListItem", "position": 2, "item": {"@id": "https://www.metatrader5.com/en/mobile-trading/android/help/chart", "name": "Charts"}}, {"@type": "ListItem", "position": 3, "item": {"@id": "https://www.metatrader5.com/en/mobile-trading/android/help/chart/indicators", "name": "Indicators"}}, {"@type": "ListItem", "position": 4, "item": {"@id": "https://www.metatrader5.com/en/mobile-trading/android/help/chart/indicators/oscillators", "name": "Oscillators"}}, {"@type": "ListItem", "position": 5, "item": {"@id": "https://www.metatrader5.com/en/mobile-trading/android/help/chart/indicators/oscillators/stochastic_oscillator", "name": "Stochastic Oscillator"}} ]}
{ "@context": "https://schema.org", "@type": "FAQPage", "mainEntity": [{ "@type": "Question", "name": "MetaTrader 5: Stochastic Oscillator", "acceptedAnswer": { "@type": "Answer", "text": "The Stochastic Oscillator Technical Indicator compares where a securitys price closed relative to its price range over a given time period. The..." } }] }
```
